Emulation of electrophysiological signals derived by stimulation of a body

ABSTRACT

An emulation apparatus emulates an electrophysiological signal derived from a target area of a human or animal nervous system under the influence of a stimulation signal applied to the human or animal body. A prior signal generator generates a prior signal representing an electrophysiological signal in the absence of stimulation. A test signal representing a stimulation signal is received and used by a modelling unit to derive a modulation signal representing the degree of modulation of the electrophysiological signal, in accordance with a model of the temporal evolution of the modulation of the electrophysiological signal caused by the stimulation signal. A modulation unit modulates the prior signal in accordance with the modulation signal to output an emulation signal representing an electrophysiological signal derived under the influence of the stimulation signal. The emulation apparatus has wide use in neuroscience research, bioengineering and clinical applications.

The present invention relates to electrophysiological signals derived from a target area of the nervous system of a human or animal body under the influence of stimulation signals applied to the human or animal body.

Electrophysiological signals derived from a target area of the nervous system of a human or animal body are known to provide information about neurological function. It is also known that the electrophysiological signals may be influenced by stimulation signals applied to the human or animal body. This effect can be used to treat neurological disorders.

By way of example, Deep Brain Stimulation (DBS) is a standard treatment for a variety of movement disorders such as Parkinson's Disease, Dystonia and Essential Tremor. DBS has been also proposed and tested for the treatment of psychiatric disorders such as major depression, obsessive compulsive disorder (OCD), addiction and eating disorders. Conventional DBS delivers continuous stimulation at a fixed high frequency stimulation and constant amplitude. Adaptive deep brain stimulation (aDBS) aims to improve efficacy, efficiency and selectivity of the treatment by using dynamic markers of disease activity to optimise and control DBS. One particularly informative biomarker for Parkinson's disease is oscillatory activity in the beta frequency band (˜20 Hz) in the local field potential (LFP) recorded directly from the stimulation electrode when the latter is implanted in the subthalamic nucleus (STN) or globus pallidus interna (GPi).

Currently existing DBS system delivers constant stimulation to the brain at a level set by a medical staff. A closed-loop DBS system may be used to automatically adjust the parameters of the stimulation signal in real-time based on the brain response to the electrical stimulation, and therefore offers a great potential to further improve efficacy, reduce side effects and decrease treatment cost. However, closed-loop DBS control requires a good understanding of the dynamic response of the LFP signal to the stimulation [Reference 1].

Other scenarios where such closed-loop stimulation may be performed include (but are not limited to), closed-loop spinal cord stimulation, peripheral or autonomic nerve stimulation, and closed-loop non-invasive brain stimulation.

Such stimulation treatment confers major therapeutic benefits and are life-changing for many conditions, so there is a need for development of stimulation systems and protocols for their use.

The difficulty and often infeasibility in testing different control algorithms in real patients is a main obstacle in the research for improving the algorithms for close-loop stimulation. Meanwhile, lack of understanding on how the stimulator will behave given the variations in the electrophysiological signals in patients during the closed-loop stimulation protocol reduces the confidence of the clinical team in implementing those more advanced protocols, compared to the traditional stimulation protocol, in which all the stimulation parameters are under the manual control of the clinical carer.

According to a first aspect of the present invention, there is provided an emulation apparatus arranged to emulate an electrophysiological signal derived from a target area of the nervous system of a human or animal body under the influence of a stimulation signal applied to the human or animal body, the emulation apparatus comprising: a prior signal generator arranged to generate a prior signal representing an electrophysiological signal derived from a target area of the nervous system of a human or animal body in the absence of a stimulation signal; a test signal input arranged to receive a test signal representing a stimulation signal applied to the human or animal body; a modelling unit arranged to derive a modulation signal, which modulation signal represents the degree of modulation of the electrophysiological signal by the stimulation signal, from the test signal in accordance with a model implemented within the modelling unit of the temporal evolution of the modulation of the electrophysiological signal caused by the stimulation signal; and a modulation unit arranged to modulate the prior signal in accordance with the modulation signal to output an emulation signal representing an electrophysiological signal derived under the influence of the stimulation signal.

The emulation apparatus is therefore a tool that provides emulation of an electrophysiological signal derived from a target area of the nervous system of a human or animal body under the influence of a stimulation signal applied to the human or animal body, and is a core part of the intelligent deep brain stimulation system (iDBS) for advanced control of the nervous system. This is achieved based on an appreciation that the temporal evolution of the modulation of the electrophysiological signal caused by the stimulation signal may be modelled. Such a model may take advantage of knowledge about the physiological response of the specific target area to electrical stimulation. Accordingly, a model of that temporal evolution is implemented with a modelling unit and is used to derive a modulation signal which represents the degree of modulation of the electrophysiological signal. The modulation signal is used to modulate a prior signal representing the electrophysiological signal, and thereby to output an emulation signal representing an electrophysiological signal derived under the influence of the stimulation signal.

This allows the effect of stimulation signals represented by the test signal to be understood, which is useful in a wide range of applications, some examples of which are as follows.

One type of application is the study of stimulation by neuroscience researchers, the development of stimulation systems by bioengineers, and the training of clinicians.

The emulation apparatus allows researchers to explore complex control algorithms capable to adapt automatically to a specific patient, and simultaneously addressing multiple symptoms. The emulation apparatus similarly allows testing in real-time of the developed algorithms, the research protocol and safety of their experiments before collecting data from patients. This provides optimal use of scarce recording opportunities and high-quality data from experiments. The emulation apparatus can be extended to any medical condition where a set of signals respond to electrical stimulation by updating the structure of the model and its implementation.

Bioengineers developing stimulation systems are provided with the same benefits as researchers. At the present time, control algorithms embedded in implanted medical devices are simple, but the design of more complex control algorithms for the stimulation signal requires the possibility to test both functionality and real-time electrical behaviours for improving reliability and safety prior to clinical use. In addition, the emulation apparatus can provide evidence to demonstrate to regulatory bodies that equipment has been thoroughly tested for scenarios not easily reproducible with animal testing or with human for ethical reasons, based on a proved mathematical model. This approach is known to facilitate significantly regulatory approval.

Another type of application is to assist clinicians with clinical usage of stimulation systems. The emulation apparatus may assist clinicians with training, for example by facilitating a clinician to train on a specific stimulation system in an environment very much like that of a patient. The emulation apparatus may also assist clinicians with clinical usage of a stimulation system to treat a condition of a specific patient. For example, templates of specific disease conditions and/or information from the patient allows the clinician to carry out tests of their clinical interventions ahead of time and to derive a suitable parameters for the stimulation signal. This can improve both the patient's safety and the clinician's efficiency. Therefore, the emulation apparatus presented here is a core part of the intelligent deep brain stimulation system (iDBS) for advanced control of neurological medical conditions.

The stimulation signal may be a DBS stimulation signal for application to a target area of the brain of the human or animal body in DBS, for example aDBS. However, the techniques disclosed herein is equally applicable to other forms of stimulation of any part of the nervous system of a human or animal body.

For example, the techniques described herein may be applied to neuroscience applications where the stimulation signal target area is in the brain or any other part of the nervous system. A few examples are: closed-loop deep-brain stimulation for movement disorders or psychiatric disorders, closed-loop spinal cord stimulation (as used for example in chronic pain management), closed-loop cortical stimulation (as used for example in seizure control), peripheral or autonomic nerve stimulation, or closed-loop non-invasive brain stimulation.

Preferably, the model may include some or all of the following features.

The model may represent an algebraic change in the modulation with at least one parameter of the stimulation signal. The algebraic change may be for example an algebraic decrease, which may be an exponential decrease.

The model may include at least one differential stage, preferably two cascaded differential stages with time constants of different orders of magnitude. The differential stages may be, for example, of first order. One of the time constants may correspond to the low pass response of neural membranes of neurons to the stimulation signal. One of the time constants may represents the dynamic response of a gross average of the electrophysiological signal derived from the target area of the nervous system to the stimulation signal.

The model may further represent a saturation of the modulation at a magnitude that is dependent on at least one parameter of the stimulation signal, preferably being dependent on plural parameters of the stimulation signal.

The model may represent a gain of the modulation with respect to plural parameters of the stimulation signal.

Optionally, the emulation apparatus may further comprise an external disturbance signal generator arranged to generate an external disturbance signal representing external disturbances to the electrophysiological signal, the modulation unit being arranged to add the external disturbance signal to the emulation signal. For example, the external disturbances may include one or more of: artefacts of the stimulation signal on the signal measured from the human or animal body; DC-drift bias; electrocardiogram artefacts; and electrical noise. This is not essential and relates to practical considerations rather the target area itself. However, the use of the external disturbance signal is useful because it advantageously produces a modulation signal that more closely represents the electrophysiological signal that is derived under the influence of the stimulation signal in a practical system.

The prior signal may be, or may be derived from, a signal measured from an actual human or animal body. This allows the emulation apparatus to provide information based on actual human or animal data. This is useful in many applications, for example where a clinician is deriving suitable parameters for a stimulation signal to treat a specific patient.

Alternatively, the prior signal may be a synthetic signal. This is useful in many applications, for example allowing testing of stimulation signals over a wider range of patient parameters for which measured data is not available, for example due to scarcity of data or to cover situations for which it would be dangerous or unethical to take measurements.

The electrophysiological signal represented by the prior signal may be a signal representing a frequency domain parameter of a signal measured from the human or animal body in the absence of a stimulation signal. The measured signal may be a measured voltage, for example an LFP signal in the case of DBS. Similarly, the signal representing a frequency domain parameter thereof may be the power of given frequency band, for example a beta band signal in the case of DBS.

As an alternative, the electrophysiological signal represented by the prior signal could be an actual signal measured from the human or animal body, for example a measured voltage such as an LFP signal in the case of DBS. In that case, the emulation apparatus may further comprise a frequency domain processing unit arranged to process the emulation signal in the frequency domain to derive a processed emulation signal representing a frequency domain parameter of the electrophysiological signal derived under the influence of the stimulation signal, for example a beta band signal in the case of DBS.

The test signal may comprise a temporal signal representing the stimulation signal or may comprise parameters representing the waveform of the stimulation signal.

The emulation apparatus may be implemented in hardware by electronic components, may be implemented in software by a computer program, or a combination of both.

According to a second aspect of the present invention, there is provided a method similar to that implemented in the emulation apparatus.

The steps of the method may be performed by a computer apparatus. Thus, further according to the second aspect of the present invention, there may be provided a computer program capable of execution by a computer apparatus and configured, on execution, to cause the computer apparatus to perform the method according to the second aspect of the present invention. The computer program may be stored on a computer-readable storage medium.

To allow better understanding, an embodiment of the present invention will now be described by way of non-limitative example with reference to the accompanying drawings, in which:

FIG. 1 is a functional block diagram of an emulation apparatus;

FIG. 2 is a schematic diagram of the waveform of a stimulation signal for DBS;

FIG. 3 is a set of plots illustrating the power spectral response and LFP signal derived under the influence of a DBS stimulation signal from an actual participant;

FIG. 4 is a graph of the power spectrum of an envelope of the beta band signal response to DBS at different voltage amplitude;

FIG. 5 is a set of histograms of prediction errors of three models for modulation of a beta band signal under the influence of a stimulation signal;

FIG. 6 is a set of plots of prediction accuracy of the three models vs. the actual data;

FIG. 7 is a graph of frequency against amplitude for the three models for a constant beta power reduction of −1.5 dB;

FIG. 8 are graphs of the beta band signal measured from three participants with PD in response to a step change in stimulation amplitude;

FIG. 9 are two graphs of the beta band signal measured from two participants with PD in response to a step change in stimulation amplitude;

FIG. 10 is a graphical representation of a dynamic Wiener memoryless (nonlinear) saturation function;

FIG. 11 is a functional block diagram of an external disturbance signal generator of the emulation apparatus;

FIGS. 12 and 13 are graphs at different time scales of an example of an LFP signal on which a stimulation artefact is present;

FIG. 14 is plot of the spectral intensity of an LFP signal on which a stimulation artefact is present;

FIG. 15 is a graphical representation of an implementation in a simulation environment of a modulation dynamics block of a modelling unit of the emulation apparatus;

FIG. 16 is a set of graphs of signals recorded within an example of a software implementation of the emulation apparatus;

FIG. 17 is a functional block diagram of an implementation in hardware of a stimulation effect block of a modelling unit of the emulation apparatus;

FIG. 18 is a chronogram of the operation of the stimulation effect block of FIG. 21.

FIGS. 19 to 22 are plots of signals developed within a hardware implementation of the emulation apparatus, with different magnifications; and

FIGS. 23 and 24 are plots of signals developed within a hardware implementation of the emulation apparatus in closed-loop, with different magnifications.

FIG. 1 illustrates an emulation apparatus 1 that emulates an electrophysiological signal derived from a target area of the nervous system of a human or animal body under the influence of a stimulation signal applied to the human or animal body, i.e. an externally generated electrical signal. The application to the human or animal body may in general be by any appropriate means, for example by an electrode in the example of DBS described below, or by other types of probe such as a coil.

As described further below, the emulation apparatus 1 may be implemented in hardware or software, but in both cases the emulation apparatus 1 receives a test signal representing a stimulation signal applied to the human or animal body and outputs an emulation signal representing an electrophysiological signal derived under the influence of the stimulation signal represented by the test signal. The emulation apparatus 1 is capable of closely reproducing the electrical, temporal and spectral behaviour of electrophysiological signals seen in patients. The electrophysiological signal represented by the output emulation signal may be studied as a response to different stimulation signals represented by the test signal.

As such the emulation apparatus 1 provides a practical tool for neuroscience researchers and bioengineers as described above, for example for designing, developing and testing advanced control algorithms prior to clinical tests and chronic implementation in patients.

The example of the emulation apparatus 1 described in detail below relates specifically to DBS, in which the target area is the subthalamic nucleus (STN) or globus pallidus interna (GPi), and the electrophysiological signal is a beta band signal which is a frequency domain parameter in the beta frequency band (˜20 Hz) derived from the LFP signal by frequency domain processing. Similarly, the stimulation signal has a waveform for deep brain stimulation of the brain. The waveform may be selected to treat a disorder in the brain, including movement disorders, such as Parkinson's disease (PD), or other neurological and psychiatric disorders. The stimulation signal may take a conventional form for this purpose.

By way of example, the stimulation signal may have a waveform 2 as shown in FIG. 2. In this example, the stimulation signal comprises a pair of stimulation pulses 3 of positive and negative polarity. The stimulation pulses 3 are square in the example of FIG. 2 but in general may be of other shapes. The stimulation pulses 3 may have widths 4 in a range from a lower limit of 0.1 μs, preferably 1 μs, to an upper limit of 5000 ms, preferably 500 μs. For example, the width 4 may typically be 60 μs. The stimulation pulses 3 may have widths 4 that are the same or different. The pairs of stimulation pulses 3 may have no separation or may have a separation. Where present, the separation may be less than 1000 μs, preferably less than 500 μs, typically 20 μs, and/or may be less than the duration of each of the pulses. The stimulation pulses may have an amplitude 5 in a range from 0.1 V to 10.0 V. The stimulation signal may have a period 6 corresponding to a stimulation frequency in the range from 1 Hz to 500 Hz, typically being 130 Hz in currently available devices.

However, the example of DBS is not limitative, and the emulation apparatus 1 may be adapted to other forms of stimulation of any target area of the nervous system of a human or animal body. For example, the emulation apparatus 1 may be applied to neuroscience applications where the target area is in the brain or any other part of the nervous system. As mentioned above, a few examples are: closed-loop deep-brain stimulation for movement disorders or psychiatric disorders, closed-loop spinal cord stimulation (as used for example in chronic pain management), closed-loop cortical stimulation (as used for example in seizure control), peripheral or autonomic nerve stimulation, or closed-loop non-invasive brain stimulation.

Similarly, the electrophysiological signal derived from a target area of the nervous system of a human or animal body may be of any form without limitation to the example of a beta band signal. Some non-limitative alternative examples are an EMG (electromyogram) signal, and EEG (electroencephalogram) signal, a MEG (magnetoencephalography) signal or a ECG (Electrocardiogram) signal. The electrophysiological signal may be of any electrical type including a voltage physiological signal, a current physiological signal, an electrode impedance signal, and may in general be an analogue signal or a digital signal.

The emulation apparatus 1 will now be described in more detail. The emulation apparatus implements a model of the target area in order to emulate the electrophysiological system. The emulation apparatus 1 includes various functional blocks that implement the model. Thus, the functional blocks in operation perform steps of a method of emulating an electrophysiological signal derived from a target area of the nervous system of a human or animal body under the influence of a stimulation signal applied to the human or animal body.

To assist understanding in view of the complexity, the functions of the functional blocks will be described first, before then describing the software and hardware implementations of those functional blocks within the emulation apparatus 1.

The emulation apparatus 1 includes a prior signal generator 10 that generates a prior signal representing the beta band signal, which is the electrophysiological signal in this case, derived from the target area in the absence of the stimulation signal.

The prior signal may be a signal that is, or is derived from, a signal measured from an actual human or animal body. For example, the signal may be measured from an actual patient to be treated by a stimulation signal.

Alternatively, the prior signal may be a synthetic signal. In this case, the prior signal generator 10 may implement a simplified and hypothetical representation how beta activity is generated at the neural network level by a generator with different degrees of a tonic activity corresponding to ongoing relatively stable background beta activity, and a phasic activity representing a more sporadic bursting activity to produce the beta band signal extracted from the overall local field potential recorded from the implanted electrodes.

In either case, the beta band signal can be either expressed in the power domain by

x_(β_(LFP_((dB)))),

or in the voltage domain by

x_(β_(LFP_((V))))

(as described below in more detail).

The emulation apparatus 1 has a test signal input 20 that receives a test signal u_(N) representing a stimulation signal applied to the human or animal body.

The test signal may comprise a temporal signal representing the stimulation signal, for example being a temporal signal having the waveform 2 of the stimulation signal shown in FIG. 2. The test signal u_(N) may be generated by a test signal generator 21.

Alternatively, the test signal may comprise parameters representing the waveform of the stimulation signal. For example in the case of the waveform 2 of the stimulation signal shown in FIG. 2, the parameters may be the amplitude u_(Na), pulse-width u_(Np) and frequency u_(Nf) of the stimulation signal.

The emulation apparatus 1 includes a modelling unit 30 which derives a modulation signal that represents the degree of modulation ρ_(β) of the beta band signal by the stimulation signal. The emulation apparatus 1 is based on an appreciation that the stimulation signal modulates the beta band signal and that is possible to model the temporal evolution of the modulation from the stimulation signal. Accordingly, the modelling unit 30 derives the modulation signal from the test signal which represents the stimulation signal in accordance with a model implemented within the modelling unit 30 described in detail below.

Thus, the emulation apparatus 1 also includes a modulation unit 40 that modulates the prior signal in accordance with the modulation signal. As the prior signal represents the beta band signal derived from the target area in the absence of the stimulation signal and the modulation signal represents the degree of modulation caused by the stimulation signal, the modulation unit 40 outputs an emulation signal {tilde over (y)}_(β) _(LFP) that represents the beta band signal derived under the influence of the stimulation signal. This may be implemented by the modulation unit 40 including a multiplier 41 (in software or hardware) that multiplies the prior signal representing the beta band signal x_(β) _(LFP) by the modulation signal ρ_(β) representing the degree of modulation, both being temporal signals, thereby producing the emulation signal {tilde over (y)}_(β) _(LFP) representing the beta band signal derived under the influence of the stimulation signal.

The modelling unit 30 implements the model of the temporal evolution of the modulation of the beta band signal caused by the stimulation signal models based on a Hammerstein-Wiener model structure [Reference 2]. In particular, the modelling unit 30 includes functional blocks which operate on the test signal. An overview of the functional blocks of the modelling unit 30 is as follows.

The command saturation block 31 receives the input test signal u_(N) and outputs a limited test signal u which is a temporal signal representing the stimulation signal but with its parameters (e.g. amplitude u_(Na), pulse-with u_(Np) and frequency u_(Nf)) limited to be within a clinically safe range to generate the actual stimulation pulse. For example, the limited test signal u characterised by its amplitude u_(a), pulse-with u_(p) and frequency u_(f).

The limited test signal u is input to a stimulation effect block 32 that models the temporal evolution of the building of the stimulation effect state variable x_(E). To increase simulation speed, it is possible to use the stimulation pulse action u_(PA) (input) represented by the (mathematical) multiplication of the three stimulation parameters, instead of the actual stimulation pulse u (explained further down). This function is characterised by its steady-state gain k_(E), time constant τ_(E) and a continuous-time first-order differential equation.

The output of the stimulation effect block 32 is input to a modulation dynamics block 33 that models the state variable (output) x_(D) representing the dynamic beta modulation evolution/response function to the stimulation parameters. This function is also represented by a continuous time-varying first-order system characterised by its time-varying steady-state gain k_(D) (t) and time-varying time constant τ_(D)(t).

The stimulation effect block 32 and the modulation dynamics block 33 therefore form two cascaded differential stages (being first order in this example) with time constants of different orders of magnitude. In particular and as described in more detail below, the time constant of the stimulation effect block 32 represents the low pass response of neural membranes of neurons to the stimulation signal and the time constant of the modulation dynamics block 33 represents the dynamic response of a gross average of the beta band signal to the stimulation signal.

The stimulation effect block 32 and the modulation dynamics block 33 together apply a gain of the modulation with respect to plural parameters of the stimulation signal as described in detail below.

The output of the modulation dynamics block 33 is input to a modulation saturation block 34 that models the state variable (output) x_(S) representing the limited modulation as a response to the stimulation parameters, using a Wiener function. The modulation dynamics block 33 represents a saturation of the modulation at a magnitude that is dependent on plural parameters of the stimulation signal, for example each of amplitude u_(a), pulse-with u_(p) and frequency u_(f).

That said, the use of two cascaded differential stages (i.e. the stimulation effect block 32 and the modulation dynamics block 33 in this example) is not essential. As an alternative, a block performing a single first order differential function could be used instead. For example, the stimulation effect block 32 may be omitted.

The output of the modulation saturation block 34 is input to a modulation algebraic block 35 that outputs the modulation signal ρ_(β), modelling the static algebraic relationship between the degree of modulation represented by the modulation signal ρ_(β) and the three stimulation parameters amplitude u_(a), frequency u_(f) and pulse-with u_(p). This may for example be an algebraic decrease, for example an exponential decrease. It is also possible to position this algebraic function before the modulation dynamics block 33, and adapt its relationship with an appropriate function.

The modelling unit also includes an external disturbance signal generator 36 that generates an external disturbance signal w representing external disturbances to the beta band signal. As described below, these external disturbances represented by the external disturbance signal w include artefacts of the stimulation signal on the signal measured from the human or animal body; DC-drift bias; electrocardiogram artefacts; and electrical noise. The modulation unit 40 includes an adder 41 that adds the external disturbance signal w to the emulation signal {tilde over (y)}_(β) _(LFP) , to provide a modified emulation signal ŷ_(β) _(LFP) . The use of the external disturbance signal generator 36 is not essential, but is advantageous in that the modified emulation signal ŷ_(β) _(FP) produced thereby better reflects the output of a practical stimulation system.

The basis of the model implemented in the modelling unit 30 will now be discussed.

Many research studies have reported a decrease of the beta band signal (15-30 Hz) recorded in the STN when standard high frequency electrical DBS is applied in the same area to treat Parkinson's disease (PD). In previous studies, the average of the beta band signal decreased when the system reached steady state was quantified via the power spectrum. This is illustrated in FIG. 3 which shows the standard power spectral response (upper plot) to stimulation pulses having increasing amplitude (middle plot) and the resultant LFP (lower plot) from the right STN obtained from a male participant with PD. The amplitude of the electrical stimulation was varied with a constant stimulation frequency of 130 Hz and a constant pulse-width of 60 μs. The LFP was then filtered, and the power was estimated using a wavelet transform. FIG. 3 shows a visible decrease in the power of beta band signal when DBS is turned on at different voltage amplitudes (enclosed in boxes in FIG. 3).

The dynamics and frequency components of the power of the beta band signal was investigated, applying the wavelet transform, were investigated. The dynamics of the power changed with the amplitude of the stimulation pulses as shown in FIG. 4. It can be seen that the frequency content of the beta envelope ranges between 0 and 5 Hz with a peak around 1 to 1.5 Hz. Most importantly, there is a relationship between the level of beta envelop reduction obtained and the amplitude of the stimulation applied. That is, the higher the stimulation amplitude, the higher is the observed decrease in power of the beta band signal (light to dark lines in FIG. 4 correspond to low to high amplitude stimulation, respectively).

Thus, it can be seen how the stimulation signal modulates the beta band signal. This modulation is modelled within the modelling unit 3 as follows.

Based on a study of the results from Qian et al. [Reference 3], the present inventors have concluded that a linear static relationship is satisfactory for the aim to represent the relationship between the log transformed beta reduction ρ_(β) _((dB)) and the three stimulation pulse parameters: amplitude u_(a), frequency u_(f) and pulse-with u_(p) within a certain tested range, when these parameters were tested independently while the other two parameters were kept constant.

In this regard, three plausible candidate models were considered for describing the relationship between the stimulation pulse parameters and the degree of modulation represented by the modulation signal ρ_(β) _((dB)) . This relationship (log transformed) is given by equation (1):

$\begin{matrix} {\rho_{\beta_{({dB})}}\overset{\Delta}{=}{{10 \cdot {\log_{10}\left( \frac{P_{\beta_{S}}}{P_{\beta_{I}}} \right)}}\overset{\Delta}{=}{20 \cdot {\log_{10}\left( \frac{V_{\beta_{S}}}{V_{\beta_{I}}} \right)}}}} & (1) \end{matrix}$

In equation (1), P_(β) _(I) is the initial beta band power measured before stimulation (when the stimulator is OFF), and P_(β) ₈ , the beta power measured during stimulation (when the stimulator is ON).

Model 1 assumes that the beta reduction is a linear sum of the stimulation parameters with no interaction between the stimulation parameters and shown in equation (2).

ρ_(β) _(m1) (u _(p) ,u _(f) ,u _(p))≡c ₀−(g _(p) ·u _(p) +g _(p) ·u _(p) +g _(f) ·u _(f))  (2)

In equation (2) c₀ is the intersect, and g the constant gain associated with each pulse parameter contributing to the overall beta reduction induced by the stimulation. Model 2 assumes that beta reduction is related to the product of the three stimulation parameters equation (3).

ρ_(β) _(m2) (u _(a) ,u _(f) ,u _(p))≡c ₀ −g _(s) ·u _(p) ·u _(p) ·u _(f)  (3)

Model 3 is based on the hypothesis that the beta reduction is linearly related to the electrical energy of the stimulation pulse equation (4).

ρ_(β) _(m3) (a _(a) ,u _(f) ,u _(p))≡c ₀ −g _(s) ·u _(a) ² ·u _(p) ·u _(f)  (4)

Model 3 is based on the Total electrical energy delivered (TEED) as proposed by Koss et al. [Reference 4] given by equation (5).

$\begin{matrix} {p_{TEED} = \frac{u_{a}^{2} \cdot u_{p} \cdot u_{f}}{R}} & (5) \end{matrix}$

In equation (5) R is the equivalent resistance “seen” by the stimulating electrode, and is encapsulated into the gain g_(s).

Both Model 1 and Model 2 capture the linear relationship between the stimulation-induced beta reduction (log transformed) and the different stimulation parameters when they are tested independently as shown in Qian et al. [Reference 3]. Model 3 is also considered since TEED has been related to improve therapeutic window in Parkinson's disease (PD).

The goodness of fit and prediction accuracy was used to evaluate how the three candidate models capture the results described in Qian et al. [Reference 3]. 66 data points in total were extracted from the linear regions (ignoring saturating data from lower or higher stimulation parameters) from FIGS. 7, 8 and 9 of [Reference 3]. These included 18 data points with the stimulation amplitude ranging between 1.3 V and 3.0 V averaged across 21 participants, where a constant stimulation frequency of 130 Hz and pulse-width of 60 μs is assumed (FIG. 7 of [Reference 3]); 15 data points (from each sub-figure) with the stimulation frequency ranging between 80.0 Hz and 120.0 Hz averaged across 14 participants, with constant stimulation amplitude at 1.5, 2.0 and 3.0 V, and a pulse-width of 60 μs (from FIG. 8 of [Reference 3]) is assumed; and 33 extra data points (17 from the 60 μs pulse-width graph and 16 for the 90 μs graph) with the stimulation amplitude ranging between 1.3 V and 2.9 V (2.8 V for the 90 μs graph due to saturation at 3.0 V) averaged across 6 participants, where a constant stimulation frequency of 130 Hz is assumed. Using the Matlab function fitnlm designed for fitting nonlinear models, and with robust fitting enabled, the three model structures were fitted to these 66 data points.

The ‘leave-one-out’ cross-validation method was used to evaluate the prediction accuracy of each model fitted in the previous stage. To do this, in each iteration 65 data points were selected to estimate the model parameters, and the remaining single data point was used to test the predictive power of the model. This process was repeated 66 times for each model separately, so each data point was used for testing only once. Finally, the correlation coefficient R², adjusted for number of parameters, between the model-predicted value and the measured value, the mean prediction error ε and the standard deviation (SD) of the prediction error μ_(ε) of the three models were quantified and compared. The results are given in Table 1:

Model 1 Model 2 Model 3 Equation $c_{0} - \begin{pmatrix} {{g_{a} \cdot u_{a}} +} \\ {{g_{p} \cdot u_{p}} + {g_{f} \cdot u_{f}}} \end{pmatrix}$ c₀ − g_(s) · u_(a) × u_(p) · u_(f) c₀ − g_(s) · u_(a) ² × u_(p) · u_(f) Parameters c₀ ≅ +10.59 c₀ ≅ +2.47 c₀ ≅ +0.84 g_(a) ≅ −2.5075 g_(s) ≅ +269.75 g_(s) ≅ +79.02 g_(p) ≅ −6.8 × 10⁴ g_(f) ≅ −0.02 Adjusted R² 0.61  0.64  0.62  & p-value p ≤ 2.67 × 10⁻¹² p ≤ 6.53 × 10⁻¹⁶ p ≤ 3.07 × 10⁻¹⁵ Mean error 0.050 0.069 0.059 ε Error SD: μ_(ε) 1.388 1.294 1.317

The comparison revealed that Model 2, in which the beta reduction is linearly related to the product of the three stimulation parameters, provides the simplest relationship and best data fitting, with a predicting power of R₂ ²≅0.64; p≤6.53×10⁻¹⁶, whiles Model 1 has prediction capacity of R₁ ²≅0.61; p≤2.67×10⁻¹², and Model 3 has a R₃ ²≅0.62; p≤3.07×10⁻¹⁶ (c.f. Table 1). However, those values are closed to each other mainly because the number of data points available is relatively small given that all three models have three variables.

Furthermore, the analysis of the prediction error ε in FIG. 5 shows that it is almost normally distributed for Model 2, whiles being slightly positively skewed for the two other models. Table 1 shows that the Model 2 has a mean prediction error ε ₂≅0.069, whereas Model 1 and Model 3 have a mean value of ε ₁≅0.050 and ε ₃≅0.059 respectively; values that are very closed to each other. The prediction accuracy of these three models with respect to the amplitude u_(a) and frequency u_(f), and at constant pulse-with u_(p)=60 μs, can be evaluated in FIG. 6 (wherein the mesh is the prediction, the dark circles are the actual data, and the light circles are the data behind the predicted mesh).

In addition to this quantitative analysis, a qualitative analysis has been conducted to further support the choice of one of these three proposed models. To this end, the situation was considered where a constant beta power reduction of ρ_(β) _(c) =1.5 dB, which is a value existing in all figures of [Reference 3]. Since there is not enough data for the pulse-width u_(p), only the effect of the amplitude u_(a) and frequency u_(f) parameters was considered for this purpose. In this situation, the pulse-width is taken to be constant u_(p)=60 μs, and the three models are written as given by equations equation (2), (3) and (4) in their updated expression in equation (6).

ρ_(β) _(m1) (u _(a) ,u _(f))≡c ₀−(g _(a) ·u _(a) +g _(f) ·u _(f) _(I) )

ρ_(β) _(m2) (u _(a) ,u _(f))≡c ₀ −g _(s) ·u _(a) ·u _(f) ₂

ρ_(β) _(m3) (u _(a) ,u _(f))≡c ₀ −g _(s) ·u _(a) ² ·u _(f) ₃   (6)

The values of amplitude and frequency required to achieve the constant beta power reduction of ρ_(β) _(c) =1.5 dB are considered. Four pairs of data points have been estimated directly from FIGS. 7, 8 and 9 of [Reference 3], which lead to the desired constant beta power reduction of ρ_(β) _(c) =1.5 dB as shown in equation (7).

$\begin{matrix} \left\lbrack {\begin{matrix} u_{f} & \left. u_{a} \right\rbrack \end{matrix} = \left| \begin{matrix} {130} & 1.35 \\ {118} & 1.50 \\ {100} & 2.00 \\ {81} & 3.00 \end{matrix} \right|} \right. & (7) \end{matrix}$

The relationship between the frequency u_(f) and the amplitude u_(a) is shown in FIG. 7, when the modulation is equal to ρ_(β) _(c) =1.5 dB.

From equation (6), the frequency u_(f) can be expressed as a function of the amplitude u_(a) for the three candidate relationships as given by equation (8).

$\begin{matrix} {\left( {\rho_{c_{1}} - c_{0}} \right) = {{{{- g_{a}} \cdot u_{a}} - {g_{f} \cdot {u_{f_{1}}\left( {\rho_{c_{2}} - c_{0}} \right)}}} = {{{- g_{s}} \cdot u_{a} \cdot {u_{f_{2}}\left( {\rho_{c_{3}} - c_{0}} \right)}} = {\left. {{- g_{s}} \cdot u_{a}^{2} \cdot u_{f_{1}}}\Rightarrow u_{f_{1}} \right. = {\left. {{- \frac{\left( {\rho_{c_{1}} - c_{0}} \right)}{g_{f}}} - {\frac{g_{a}}{g_{f}} \cdot u_{a}}}\Rightarrow u_{f_{2}} \right. = {\left. {{- \frac{\left( {\rho_{c_{2}} - c_{0}} \right)}{g_{s}}} \cdot \frac{1}{u_{a}}}\Rightarrow u_{f_{3}} \right. = {{- \frac{\left( {\rho_{c_{3}} - c_{0}} \right)}{g_{s}}} \cdot \frac{1}{u_{a}^{2}}}}}}}}} & (8) \end{matrix}$

The first relationship is a straight line between the frequency u_(f) and the amplitude u_(a), whereas the second is a 1/x and the third a 1/x² relationship. In order to fit these models onto our current data, general forms are taken as given by equation (9), and then the optimal fit for these three cases is computed numerically (using the ‘fit’ function from Matlab), as shown in FIG. 7.

$\begin{matrix} {u_{f_{1}} = {{{a \cdot u_{a}} + {bu_{f_{2}}}} = {{{\frac{a}{u_{a}} + b}u_{f_{3}}} = {\frac{a}{u_{a}^{2}} + b}}}} & (9) \end{matrix}$

FIG. 7 shows that the actual data seems to follow closely Model 2 represented by a 1/x relationship; whereas, the model 1 based on a straight line is clearly a poor fit. The last analysis is to evaluate the slope between the beta reduction ρ and the stimulation amplitude u_(a) by taking the partial derivative with respect to the stimulation amplitude u_(a) of Model 2 & 3 given by equation (6) when the frequency u_(f) is kept constant; the slopes of both models are given on equation (10).

$\begin{matrix} {{\frac{\partial\rho_{\beta_{m\; 2}}}{\partial u_{a}} = {\Delta_{\rho_{2}} = {{- g_{s}} \cdot u_{f}^{\eta}}}}{\frac{\partial{\rho_{\beta}}_{\;_{m3}}}{\partial u_{a}} = {\Delta_{\rho_{3}} = {{{- 2} \cdot g_{s} \cdot u_{a} \cdot u_{f}^{\eta}} = {2 \cdot \Delta_{\rho_{2}} \cdot u_{a}}}}}} & (10) \end{matrix}$

From equation (10), Model 2 implies a constant slop, whiles Model 3 implies that the slope is proportional to the amplitude of the stimulation, which is clearly at odds with data in FIG. 7 of [Reference 3].

Overall, Model 1, based on a linear sum of the stimulation parameters, has the poorest fit both to the actual data and to the situation where a constant beta power reduction of ρ_(β) _(c) =1.5 dB is required. Model 3, based on the pulse total electrical energy, although offering a good fit, implies that the reduction slope is proportional to the amplitude of the stimulation, which is not the case. Finally, Model 2, based on the interaction of the three stimulation parameters, both offers a good data fitting and a slope consistent with currently available data. These conclusions are supported by a visual inspection of the prediction accuracy given in FIG. 6 of the these three models with respect to the amplitude u_(a) and frequency u_(f), and at constant pulse-with u_(p)=60 μs.

In total, Model 2 provides the best data fitting and yet the simplest and most consistent relationship, and therefore has been chosen as the structure of the static algebraic relationship within the model implemented in the modelling unit 30 between log transformed beta modulation ρ_(β) _((dB)) and the three stimulation parameters of amplitude u_(a), pulse-with u_(p) and frequency u_(f) as given by equation (11).

$\begin{matrix} {{{{\rho_{\beta}\left( {u_{a},u_{f},u_{p}} \right)}_{({dB})}\overset{\Delta}{=}{c_{0_{({dB})}} - {g_{s_{({{dB}/V})}} \cdot u_{a_{(V)}} \cdot u_{p_{(s)}} \cdot u_{f_{({Hz})}}}}}{{{with}\mspace{14mu} c_{0}}\overset{\sim}{=}{+ 2.4657}},{g_{s}\overset{\sim}{=}{+ 269.7454}}}{{u_{a} > 0},{u_{f} > {0\mspace{14mu}{and}\mspace{14mu} u_{p}} > 0}}} & (11) \end{matrix}$

The algebraic relationship implemented in the modulation algebraic block 35 will now be considered. This may for example be an algebraic decrease, for example an exponential decrease.

Modulation of the beta band signal induced by stimulation can be expressed in two related domains: the power domain where

x_(β_(LFP_((dB))))

is the power of the beta band LFP signal, and is particularly useful for designing and evaluating the overall functionality of the closed-loop algorithm in simulation; the voltage domain where

x_(β_(LFP_((V))))

is the beta band LFP voltage signal, and is particularly useful for designing and evaluating the overall functionality of the real-time closed-loop algorithm and the signal conditioner implementation (real-time estimation of the beta and extraction of its envelope).

Considering the power domain, equation (11) expresses the modulation of the beta band signal in relation to stimulation parameters in the power domain: as a ratio of power. Combining the definition of a power spectrum and equation (11) yields the identity in equation (12).

$\begin{matrix} {{\rho_{\beta}\left( {u_{a},u_{f},u_{p}} \right)}_{({dB})}\overset{\Delta}{=}{{10 \cdot {\log_{10}\left( \frac{P_{\beta_{S}}}{P_{\beta_{I}}} \right)}} = {c_{0} - {g_{s} \cdot u_{a} \cdot u_{p} \cdot u_{f}}}}} & (12) \end{matrix}$

From equation (12), P_(β) _(I) is the initial beta band power measured before stimulation (when the stimulator is OFF), and P_(β) _(S) the beta power measured during stimulation (when the stimulator is ON). The change of base formula allows to convert log₁₀ into the natural logarithm ln as shown in equation (13).

$\begin{matrix} {{\log_{10}(x)}\overset{\Delta}{=}{{\frac{1}{\log_{e}\left( {10} \right)} \times {\log_{e}(x)}} = {\frac{1}{\ln\mspace{11mu}(10)} \times \ln\mspace{11mu}(x)}}} & (13) \end{matrix}$

The static power ratio relationship given by equation (12) is expressed in the natural logarithm base given by equation (14).

$\begin{matrix} {\rho_{\beta_{({dB})}} = {\left. \ln \middle| \frac{P_{\beta_{S}}}{P_{\beta_{I}}} \right| = {\frac{\ln\mspace{11mu}(10)}{10} \cdot \left( {c_{0} - {g_{s} \cdot u_{a} \cdot u_{p} \cdot u_{f}}} \right)}}} & (14) \end{matrix}$

Taking the exponential on both sides of equation (14) leads finally to the expression of the direct relationship between beta power reduction ρ_(β) _(P) in the power domain and the three stimulation parameters: amplitude u_(a), frequency u_(f) and pulse-with u_(p) as shown in equation (15).

$\begin{matrix} {{{\rho_{\beta}\left( {u_{a},u_{p},u_{f}} \right)}_{P} = {\frac{P_{\beta_{S}}}{P_{\beta_{I}}} = {e^{({k_{0_{P}} - {k_{s_{P}} \cdot u_{a} \cdot u_{p} \cdot u_{f}}})} = {\left. {\rho_{\beta_{0_{P}}} \cdot e^{{- k_{s_{P}}} \cdot u_{a} \cdot u_{p} \cdot u_{f}}}\mspace{20mu}\Rightarrow P_{\beta_{S}} \right. = {{P_{\beta_{I}} \cdot \rho_{\beta_{({dB})}}} = {P_{\beta_{I}} \cdot \rho_{\beta_{0_{P}}} \cdot e^{{- k_{s_{P}}} \cdot u_{a} \cdot u_{p} \cdot u_{f}}}}}}}}\mspace{20mu}{{{with}\mspace{14mu} k_{0_{P}}} = {{\frac{\ln\mspace{11mu}(10)}{10} \cdot c_{0}}\overset{\sim}{=}{+ 0.5678}}}\mspace{20mu}{k_{s_{P}} = {{\frac{\ln\mspace{11mu}(10)}{10} \cdot g_{s}}\overset{\sim}{=}{+ 62.1111}}}\mspace{20mu}{{{and}\mspace{14mu}\rho_{\beta_{0_{P}}}} = {e^{k_{0_{P}}}\overset{\sim}{=}{+ 1.7643}}}} & (15) \end{matrix}$

Alternatively, the definition of the relative power used in spectral analysis may be converted into the voltage domain. This time as a ratio of voltage is shown by equation (16)

$\begin{matrix} {{\rho_{\beta}\left( {u_{a},u_{f},u_{p}} \right)}_{({dB})}\overset{\Delta}{=}{{10 \cdot {\log_{10}\left( \frac{P_{\beta_{S}}}{P_{\beta_{I}}} \right)}}\overset{\Delta}{=}{20 \cdot {\log_{10}\left( \frac{V_{\beta_{S}}}{V_{\beta_{I}}} \right)}}}} & (16) \end{matrix}$

Similarly, equation (16), V_(β) _(I) is the initial beta band voltage measured before stimulation (when the stimulator is OFF), and V_(β) _(S) the beta voltage measured during stimulation (when the stimulator is ON). Using equations (12) to (15), the direct relationship between beta reduction ρ_(β) _(V) in the voltage domain and the three stimulation parameters of amplitude u_(a), frequency u_(f) and pulse-with u_(p) is shown in equation (17).

$\begin{matrix} {{{\rho_{\beta}\left( {u_{a},u_{p},u_{f}} \right)}_{V}\overset{\Delta}{=}{\frac{V_{\beta_{S}}}{V_{\beta_{I}}} = {e^{({k_{0_{V}} - {k_{s_{V}} \cdot u_{a} \cdot u_{p} \cdot u_{f}}})} = {\left. {\rho_{\beta_{0_{V}}} \cdot e^{{- k_{s_{V}}} \cdot u_{a} \cdot u_{p} \cdot u_{f}}}\mspace{20mu}\Rightarrow V_{\beta_{S}} \right. = {V_{\beta_{I}} \cdot \rho_{\beta_{0_{V}}} \cdot e^{{- k_{s_{V}}} \cdot u_{a} \cdot u_{p} \cdot u_{f}}}}}}}\mspace{20mu}{{{with}\mspace{14mu} k_{0_{V}}} = {{\frac{\ln\mspace{11mu}(10)}{20} \cdot c_{0}}\overset{\sim}{=}{{{+ 0.2839}\mspace{20mu} k_{s_{V}}} = {{\frac{\ln\mspace{11mu}(10)}{20} \cdot g_{s}}\overset{\sim}{=}{{{+ 31.0556}\mspace{20mu}{and}\mspace{14mu}\rho_{\beta_{0_{V}}}} = {e^{k_{0_{V}}}\overset{\sim}{=}{+ 1.3283}}}}}}}} & (17) \end{matrix}$

From this stage, when k₀, k_(S), ρ_(β) ₀ and ρ_(β) are mentioned without their associated indices, either the power or voltage domains is meant.

The dynamics of the modulation of the beta band signal are now considered.

So far, there have been presented the algebraic relationships governing the steady-state behaviour of the modulation of beta band signal due to the stimulation parameters amplitude u_(a), pulse-with u_(p) and frequency u_(f). However, the knowledge of the time course of the beta attenuation allows more sophisticated control algorithms that can optimise for reduced side effects and energy consumption for instance.

Data processing for dynamic modelling is considered as follows. To achieve this objective, STN LFPs were recorded from five participants with Parkinson's disease (PD) who were implanted with electrodes for deep brain stimulation (DBS). Standard electrical stimulation with a pulse-width u_(p)=60 μs, frequency u_(f)=130 Hz and with different amplitudes u_(a) was applied in an on-off fashion to evaluate the ‘step’ response of beta reduction to stimulation. The step response was also obtained by increasing the stimulation amplitude step by step with several minutes between each step change.

A notch filter (based on the filtfilt function in Matlab) centred at 50 Hz with a Q-factor of 30 was used in order to remove the artefact due to the mains. Then, the LFP signal was filtered with a second order Butterworth high-pass filter of 1 Hz to remove any DC component. This was followed by a second order Butterworth low-pass filter of 50 Hz to remove the frequencies above the beta band of interest. Then, the power spectrum of the filtered signal was computed using a standard wavelet transform approach, with 1 Hz frequency resolution (FIG. 3). Then, the frequencies components that were close to the peak beta frequency were added together. For participant 1, the frequency components between 22 and 28 Hz were summed. For participant 2, frequency components between 22 to 32 Hz were summed. For participant 3, frequency components between 15 and 30 were summed.

FIG. 8 shows an example of the step response of the beta band observed when DBS was switched ON in the three participants. It took several seconds before beta reached its reduced steady-state or static value.

Dynamic modelling considerations are as follows.

The main objective is to propose a model allowing the design and implementation of (dynamic) closed-loop control algorithms. Such a model is required to be close enough to the practical clinical situation where (temporal) electrical stimulations lead to temporal evolution of the beta reduction. In another words, the model is between the actual electrical stimulation pulses u from the output of the neurostimulator with a time scale in microsecond, and the beta ρ_(β) measured from the local field potential (LFP) with a time scale in seconds. Thus, the goal is to propose a framework allowing to transpose (almost) directly the design and implementation of the control algorithm based on simulation and emulation, to the patient with minimal, if any, change.

To this end, two cascaded first-order differential dynamical functions H_(E) and H_(D) are implemented to simulate the temporal evolution of the beta envelop responses to electrical stimulation (the use of a single first-order differential dynamic function is also possible), as follows.

A linear first-order continuous-time model H_(E) is implemented within the stimulation effect block 32 to describe the building up of the ‘stimulation effect’ x_(E) that defines the steady-state value or static beta reduction that will be reached after some times (several seconds) following the start of the stimulation. This model is used to represent the ‘conversion’ of the actual temporal train of electrical stimulation pulses into an ‘effect’ that will then drive the slow temporal beta reduction exemplified in FIG. 8 and represented by the transfer function H_(D).

The transfer function H_(E) represents proximal and fast reactions to the stimulation pulses, whereas the transfer function H_(D) is used to represent more distal network wide and slow phenomena. Thus, the transfer functions H_(E) and H_(D) have time constants of different orders of magnitude.

This approach is consistent to a physiologically based mean-field model of the basal ganglia-thalamocortical system (BGTCS) shown to account to a good level for some electrophysiological correlates of Parkinson's disease (PD) [Reference 10], [Reference 11]. Van Albada and Robinson capitalised on modelling work carried out over more than half century by a large community of researchers to propose their mean-filed approach using a linear second-order damped-wave equation to model at neurone level local transmission of information, and a linear first-order equation to model information processing at distal level between neural population which uses a second order damped-waves equation to model propagation waves [Reference 10], [Reference 11]. In taking the past work modelling into account, we have simplified it to use two linear first order equations: a linear first-order continuous-time model H_(E) to account for local neural processing, and a linear first-order continuous-time model H_(D) to account for more distal network-wide and slow phenomena. In doing so, we need to assume that the primary first-order model H_(E) has a time constant compatible with the time duration of the pulses in order for its output to reach a steady-state value, here called an ‘effect’, that is directly proportional (direct product) to the stimulation parameters, and would remain stable for stable stimulation parameters. Therefore, the time constant of the primary first-order model τ_(E) has to be necessary much shorter than the time constant τ_(E) observed on the more distal behaviour of beta envelop response to stimulation (cf. FIG. 8), represented by the second first-order system given by the transfer function H_(D) (c.f. below).

Conveniently the transfer function H_(E) of the ‘stimulation effect’ x_(E) given by equation (18) is defined in the Laplace domain

[Reference 5], where s represents the Laplace variable, x_(E) the state variable (output) that defines the steady-state value of the beta envelop responses to electrical stimulation, u the electrical stimulation as the control variable (input) of the stimulation effect, k_(E) the steady-state gain and τ_(E) the time constant of the stimulation effect evolution in response to the stimulation u.

$\begin{matrix} {{{H_{E}(s)} = {\frac{x_{E}(s)}{u(s)} = \frac{k_{E}}{{\tau_{E} \cdot s} + 1}}}{{{with}\mspace{14mu}\tau_{E}} \ll \tau_{D}}} & (18) \end{matrix}$

where ‘(t)’ denotes a continuous-time variable, and t∈

⁺ throughout this document. Expanding the Laplace equation (18), and taking the inverse Laplace Transform

⁻¹ from both sides leads to its differential temporal form in equation (19) required for further modelling and practical implementation [Reference 5].

$\begin{matrix} {{{{\overset{.}{x}}_{E}(t)} + {\frac{1}{\tau_{E}} \cdot {x_{E}(t)}}} = {\frac{k_{E}}{\tau_{E}} \cdot {u(t)}}} & (19) \end{matrix}$

The model given by equations (18) and (19) hypothesises that the stimulation effect has a (proportional) linear relationship with the stimulation pulse parameters as defined by equation (14) when the stimulation frequency is comprise within the linear range (70 Hz≤u_(f)≤130 Hz). The choice of a first order low-pass system of equations (18) and (19) is further consolidated by the fact the intrinsic lowpass filtering of electrical stimulation signals by neural membrane is likely to be a universal property displayed by neurons; this lowpass filtering behaviour prevent neurons to follow a high stimulation frequency [Reference 6], [Reference 7].

Moreover, in the previous section looking at the static relationship of stimulation-induced beta modulation, it is shown that Model 2, postulating that beta reduction is related to the direct product of the three stimulation parameters, is the best out of the three proposed models to represent the structure of our static algebraic relationship between beta power modulation ρ_(β) _(P) and the stimulation parameters given by equation (11). As only the positive alternance of the stimulation pulse is the ‘active’ part that leads to beta reduction (the negative part is used for charge balance), it can be considered that the input of the primary transfer function of the stimulation effect H_(E) has a shaped of a square-wave signal with a very small duty-cycle. In the standard situation this will be a positive pulse of 60 μs with a period of 1/130≅7.7 ms, thus leading to a duty-cycle of roughly 0.0078. If there is used a first-order model with a time constant compatible with the duration of the stimulation pulses and this duty-cycle, the output x_(E) will reach an average value which is directly proportional on the product of the three stimulation parameters: amplitude u_(a), frequency u_(f) and pulse-with u_(p) as required by equation (11). At this stage, for the efficient implementation of this model for numerical simulation, it is completely equivalent in term of steady-state behaviour to use the exact stimulation pulses as generated by an actual neurostimulator, or to take directly the product of the three parameters of the stimulation pulse: amplitude u_(a), pulse-with u_(p) and frequency u_(f) as the input of H_(E). In both cases, the steady-state value will be very close to each other, but the dynamic behaviour different, which is not relevant for our modelling goal, and would only last a very short period of time. Herein, this is called the ‘combined’ set of the stimulation parameters the ‘pulse action’ u_(PA) shown in equation (20). The advantage of using this combined ‘pulse action’ u_(PA) rather than the actual stimulation pulse u is that the simulation will be much faster. This approach is compatible with the fact that our goal is to develop control algorithms that act at hundred millisecond time scale to control the beta reduction behaviour that is in the time scale of several seconds.

u _(PA) =u _(a) ·u _(p) ·u _(f)  (20)

From now on, when reference is made to the stimulation command, the pulse action defined in equation (20) is intended unless stated. And, for simulation purpose, the time constant τ_(E) is set in its compatible range: 1 ms≤τ_(E)≤100 ms. In this implementation, τ_(E)=10 ms is chosen.

The dynamic model structure is now considered.

A second first-order model is used to simulate the response of the beta envelop ρ_(β) to the stimulation effect x_(E), with a time constant τ_(D) supposed to be the dominant time constant (dominant pole); thus, with a duration much longer than the primary first-order system H_(E):τ_(D)>>τ_(E). This second system is represented by the dynamic transfer function H_(D) given in equation (21) in the Laplace domain

[Reference 5]; where s represents the Laplace variable, x_(D) the state variable (output) of the dynamic beta modulation evolution/response function to stimulation effect x_(E) as the control variable (input), k_(r), the steady-state gain and τ_(D) the time constant of the beta envelop evolution in response to the stimulation effect x_(E) (and subsequently the response to the stimulation pulse u).

$\begin{matrix} {{H_{D}(s)} = {\frac{x_{D}(s)}{x_{E}(s)} = \frac{k_{D}}{{\tau_{D} \cdot s} + 1}}} & (21) \end{matrix}$

The transfer function given in equation (21) is represented in its expanded Laplace form in equation (22).

x _(D)(s)·(τ_(D) ·s+1)=k _(D) ·x _(E)(s)  (22)

Taking the inverse Laplace Transform

⁻¹ [Reference 5], from both sides of equation (22), leads to its differential temporal form in equation (23) required for further modelling and practical implementation.

$\begin{matrix} {{{{\overset{.}{x}}_{D}(t)} + {\frac{1}{\tau_{D}} \cdot {x_{D}(t)}}} = {\frac{k_{D}}{\tau_{D}} \cdot {x_{E}(t)}}} & (23) \end{matrix}$

Such a situation to cascade two first-order systems is classical in control applications: the first leading the second with typically the time constant of the first system being negligible compare to (much shorter than) the second, in order for the first system to establish its action before being able to drive the output of the second system. This is essentially the approach adopted where the “stimulation effect” function x_(E) has a time constant τ_(E) much shorter than the time constant τ_(D) of the “stimulation dynamics” function x_(E). Therefore, the total dynamic response of the beta envelop x_(E) now in response to the electrical stimulation pulse action u_(PA) can be represented by the transfer function H_(ED) given in equation (24).

$\begin{matrix} \begin{matrix} {{H_{ED}(s)} = {\frac{x_{D}(s)}{u_{PA}(s)} = {{H_{E}(s)} \cdot {H_{D}(s)}}}} \\ {= {\frac{k_{E}}{{\tau_{E} \cdot s} + 1} \times \frac{k_{D}}{{\tau_{D} \cdot s} + 1}}} \\ {= \frac{k_{E} \cdot k_{D}}{{\tau_{E} \cdot \tau_{D} \cdot s^{2}} + {\left( {\tau_{E} + \tau_{D}} \right) \cdot s} + 1}} \end{matrix} & (24) \end{matrix}$

The cascaded two first-order model hypothesises that the stimulation effect x_(E) is proportional to the pulse action u_(PA) in the steady-state regime, where it stabilises quickly (within ≈5×τ_(E)) to a constant value given by equation (25).

$\begin{matrix} {{{\underset{t\rightarrow\infty}{Lim}\left( {x_{E}(t)} \right)} \simeq {k_{E} \cdot u_{PA}}} = {k_{E} \cdot u_{a} \cdot u_{p} \cdot u_{f}}} & (25) \end{matrix}$

Whereas the final steady-state value of the stimulation modulation is reached following the end of the second first-order dynamics with has a much longer time constant (within ≈5×τ_(D)). This final steady-state value is proportional to the static gains k_(E) and k_(E) of both first order systems and the pulse action u_(PA) as given by equation (26).

$\begin{matrix} {\begin{matrix} {{{\underset{\;{t\rightarrow\infty}}{Lim}\left( {x_{D}(t)} \right)} \simeq {k_{E} \cdot k_{D} \cdot u_{PA}}} = {k_{E} \cdot k_{D} \cdot u_{a} \cdot u_{p} \cdot u_{f}}} \\ {= {k_{S}\  \cdot u_{a}\  \cdot u_{p}\  \cdot u_{f}}} \end{matrix}\begin{matrix} {{{with}\mspace{14mu} k_{S}} = {k_{E} \cdot k_{D}}} & \; \end{matrix}} & (26) \end{matrix}$

In implementing the model, for convenience from equation (26) there has been set k_(S)=k_(E) ⇒k_(E)=1, which allow us to account for variation of the gain k_(S) by a direct percentage of variation of k_(D).

The Matlab function procest may be used to identify the model parameters of the continuous-time transfer function given by equation (24). Since the time constant τ_(E) of the first pole has been set to be negligible in comparison to the dominant pole τ_(D), for the actual identification procedure a first-order model is fitted because the intention is to get an estimate of the order of magnitude of the time constant τ_(D) rather than an accurate value. Fitting a second-order transfer function leads to an over-dumped dual-pole each having a time constant roughly half that of a first-order transfer function, their sum being very close to it. FIG. 8 shows examples of such a model using equation (21) fitted onto each patient's step response data (being the light lines). A total of 13 step responses were measured from five participants with an average time constant τ_(D)≅2.94 s±3.85 s. The large standard deviation in the time constant is indicative of non-normal distribution. The time delay T_(D) found is essentially due to the ramping of the stimulation amplitude to avoid side effects, and is not taken into consideration in the model.

A rapid variation is seen within the same participant in the time constant τ_(D) (from 6 to 0.5 second) over a short period of time (less than 5 minutes in our case), for example as shown in FIG. 9 while the static gain remained constant. In addition, a relatively rapid variation of steady-state beta reduction ρ_(β) for the same stimulation pulse is seen over a longer period of time. Such parameter variation has to be taken into consideration by effectively using a time-varying model rather than a time-invariant model as originally presented in equations (21) and (23). Such a time-varying model is presented in equation (27), where the time constant τ_(D)(t) and the gain of the stimulation modulation dynamic k_(D) (t) are both a function of the time variable. For simplicity, it is considered that the static gain of the stimulation effect function k_(E) remains constant. In such a case, the variation of the overall static gain k_(S), due to a variation of the steady-state beta reduction ρ_(β) for the same stimulation pulse mentioned just above, is simply assigned to the static gain k_(D). This relatively rapid variation of the parameters of the stimulation modulation dynamic function cannot be represented with the classical Laplace transform [Reference 8]. Instead, it is directly represented in the time-varying differential equation given by equation (27).

$\begin{matrix} {{{{{\overset{.}{x}}_{D}(t)} + {\frac{1}{\tau_{D}(t)} \cdot {x_{D}(t)}}} = {\frac{k_{D}(t)}{\tau_{D}(t)} \cdot {x_{E}(t)}}}{{{{\overset{.}{x}}_{D}(t)} + {{a(t)} \cdot {x_{D}(t)}}} = {{b(t)} \cdot {x_{E}(t)}}}{{{with}\mspace{14mu}{a(t)}} = {{{\frac{1}{\tau_{D}(t)}\mspace{14mu}\&}\mspace{14mu}{b(t)}} = \frac{k_{D}(t)}{\tau_{D}(t)}}}} & (27) \end{matrix}$

In summary, a second-order continuous time-varying system is used to model the temporal evolution of the beta reduction ρ_(β) in response to stimulation pulses u in order to capture the main temporal features measured from patients. The time-varying time constant and static gain is unusual, and will be particularly challenging when controlling the dynamic profile of the beta reduction in real-time.

The saturation of the modulation implemented in the modulation saturation block 34 will now be considered.

It is noted that Model 2 from equation (11) and (15) is only valid within a certain range of each stimulation parameter. With a stimulation amplitude u_(a)<1.3 V or stimulation frequency u_(f)≤u_(f) _(Low) ≅70 Hz, the reduction of beta power ρ_(β) _((dB)) obtained does not follow anymore the linear relationship established in equation (11), and seems to remain roughly constant (c.f. FIG. 8 of [Reference 3]). This indicates that a minimal stimulation voltage amplitude and frequency are required to obtain a reduction of beta. At the other extreme, when the stimulation frequency u_(f)≥u_(f) _(High) ≅130 Hz, beta reduction saturates to a minimum value. However, different minimum values ρ_(β) _((dB)) ^(min) were reached for different stimulation amplitudes or pulse widths tested. This plateau value is lower for higher amplitude and pulse-width, and higher for lower values; thus, the saturation limits are dynamically dependent on the stimulation amplitude u_(a), pulse-with u_(p). Also, there is an obvious limitation of the three stimulation parameters to a safe clinical range.

To take into consideration these two types of limitations, a Hammerstein-Wiener model is generally used [Reference 2] as represented in FIG. 1. The stimulation parameters are first limited to a safe clinical range by a Hammerstein memoryless (nonlinear) saturation function {circumflex over (f)}_(H) defined by equation (28).

$\begin{matrix} {{u(t)} = {{{{{\overset{\hat{}}{f}}_{H}\left( {t,{u_{Na}(t)},{u_{Np}(t)},{u_{Nf}(t)}} \right)}\&}\mspace{14mu}{{\overset{\hat{}}{f}}_{H}\left( {t,.} \right)}} = \left\{ \begin{matrix} u_{a,p,f}^{\max} & {if} & {{u_{{Na},p,f}(t)} > u_{a,p,f}^{\max}} \\ {u_{a,p,f}(t)} & {if} & {u_{a,p,f}^{\min} \leq {u_{{Na},p,f}(t)} \leq u_{a,p,f}^{\max}} \\ u_{a,p,f}^{\min} & {if} & {{u_{{Na},p,f}(t)} < u_{a,p,f}^{\min}} \end{matrix} \right.}} & (28) \end{matrix}$

From equation (28), u_(a,p,f) represents each stimulation parameters limited individually (6 in total): u_(a) ^(min), u_(p) ^(max) etc.

Then, to take into consideration the dynamic nonlinear response of the beta reduction to stimulation pulse, a dynamic (nonlinear) saturation function is implemented, at the output of the beta reduction model, by a dynamic Wiener memoryless (nonlinear) saturation function {circumflex over (f)}_(W) defined by equation (29).

$\begin{matrix} {{{x_{S}(t)} = {{\overset{\hat{}}{f}}_{W}\left( {t,{x_{D}(t)},{u_{a}(t)},{u_{p}(t)},{u_{f}(t)}} \right)}}{{{with}\mspace{14mu}{{\overset{\hat{}}{f}}_{W}\left( {t,.} \right)}} = \left\{ {{\begin{matrix} {x_{S_{High}}(t)} & {{{if}\mspace{14mu}{u_{f}(t)}} > u_{f_{High}}} \\ {x_{D}(t)} & {{{if}\mspace{14mu} u_{f_{Low}}} \leq {u_{f}(t)} \leq u_{f_{High}}} \\ {x_{S_{Low}}(t)} & {{{if}\mspace{14mu}{u_{f}(t)}} < u_{f_{Low}}} \end{matrix}{where}\mspace{14mu}{x_{S_{High}}(t)}} = {{{{x_{D_{High}}(t)}\mspace{14mu}\&}\mspace{14mu}{x_{S_{Low}}(t)}} = {x_{D_{Low}}(t)}}} \right.}} & (29) \end{matrix}$

For the practical implementation of equation (29), x_(D), x_(D) _(High) and x_(D) _(Low) need to have the same dynamics for a smooth transition within the dynamic boundary of the saturated modulation signal x_(s). As beta modulation x_(D) in response to the stimulation parameters obeys a dynamic function (modelled here by a first-order dynamic function), since that response cannot happen instantaneously. Similarly, the establishment of the beta modulation boundaries x_(D) _(High) and x_(D) _(Low) cannot also happen instantaneously; it is natural to consider that these boundaries follow the same dynamic as x_(D). Therefore, the same transfer function H_(ED) is used, here (second-order given in equation (24), to derive x_(D), x_(D) _(High) and x_(D) _(Low) . Alternatively, its equivalent time-varying differential equation given by equation (27) may be used when considering that H_(ED) are time dependent. FIG. 10 shows the structure of this dynamic Wiener memoryless (nonlinear) saturation function in more detailed way based on the case of time-invariant H_(ED) for illustration; the case of time-varying, H_(ED) is replaced by the time-varying differential equation given by equation (27).

In the case of the time-invariant transfer function H_(ED) is written in the Laplace domain

[Reference 5], x_(D) _(High) , x_(D) and x_(D) _(Low) by equation (30), where H_(ED) is given in equation (24).

$\begin{matrix} \begin{matrix} {{x_{S_{High}}(s)} = {{x_{D_{High}}(s)} = {{H_{ED}(s)} \cdot u_{PA_{High}}}}} \\ {= {{H_{ED}(s)} \times \left( {u_{a} \cdot u_{p} \cdot u_{f_{High}}} \right)}} \\ {{x_{D}(s)} = {{H_{ED}(s)} \cdot u_{PA}}} \\ {= {{H_{ED}(s)} \times \left( {u_{a}\  \cdot u_{p}\  \cdot u_{f}} \right)}} \\ {{x_{S_{Low}}(s)} = {{x_{D_{Low}}(s)} = {{H_{ED}(s)} \cdot u_{PA_{Low}}}}} \\ {= {{H_{ED}(s)} \times \left( {u_{a} \cdot u_{p} \cdot u_{f_{Low}}} \right)}} \end{matrix} & (30) \end{matrix}$

In the steady-state regime, x_(D) _(High) , x_(D), and x_(D) _(Low) are given by equation (31), where k_(S) is defined by equation (26).

$\begin{matrix} {{{\underset{t\rightarrow\infty}{Lim}\;\left( {x_{S_{High}}(t)} \right)} = {{\underset{t\rightarrow\infty}{Lim}\left( {x_{D_{High}}(t)} \right)} \simeq {k_{S} \cdot u_{a} \cdot u_{p} \cdot u_{f_{High}}}}}{{\underset{t\rightarrow\infty}{Lim}\;\left( {x_{D}(t)} \right)} \simeq {k_{S} \cdot u_{a} \cdot u_{p} \cdot u_{f}}}{{\underset{t\rightarrow\infty}{Lim}\left( {x_{S_{Low}}(t)} \right)} = {{\underset{t\rightarrow\infty}{Lim}\left( {x_{D_{Low}}(t)} \right)} \simeq {k_{S} \cdot u_{a} \cdot u_{p} \cdot u_{f_{Low}}}}}{{{with}\mspace{14mu} k_{S}} = {k_{E} \cdot k_{D}}}} & (31) \end{matrix}$

Combining equations (31), (15), and (16) the algebraic modulation boundaries is finally expressed by equation (32). Note that equation (32) is valid for both power and voltage domains, and that ρ_(β) _(High) is defined by x_(S) _(Low) and vice versa for ρ_(β) _(Low) which is defined by x_(S) _(High) .

$\begin{matrix} {{{{If}\mspace{14mu} u_{f_{Low}}} \leq {u_{f}(t)} \leq u_{f_{High}}}\begin{matrix} {{x_{S}\left( {t,u_{a},u_{p},u_{f}} \right)} \cong {k_{S} \cdot {u_{a}(t)} \cdot {u_{p}(t)} \cdot {u_{f}(t)}}} \\ {\left. \Rightarrow{\rho_{\beta}\left( {t,u_{a},u_{p},u_{f}} \right)} \right. = {\rho_{\beta_{0}} \cdot e^{- x_{S}}}} \\ {= {\rho_{\beta_{0}} \cdot e^{{- k_{i}} \cdot {u_{a}{(t)}} \cdot {u_{p}{(t)}} \cdot {u_{f}{(t)}}}}} \end{matrix}\left. {{\left. {{{If}\mspace{14mu}{u_{f}(t)}} > u_{f_{High}}}\Rightarrow x_{S_{High}} \right.\mspace{14mu}\&}\mspace{14mu}{If}}\mspace{14mu}\Rightarrow{{u_{f}(t)} < u_{f_{Low}}}\Rightarrow x_{S_{Low}} \right.\begin{matrix} {{x_{S_{{High},{Low}}}\left( {t,u_{a},u_{p},u_{f_{{High},{Low}}}} \right)} \cong {k_{S} \cdot {u_{a}(t)} \cdot {u_{p}(t)} \cdot u_{f_{{High},{Low}}}}} \\ {\left. \Rightarrow{\rho_{\beta_{{High},{Low}}}\left( {t,u_{a},u_{p},u_{f_{H,L}}} \right)} \right. = {\rho_{\beta_{0}} \cdot e^{- x_{s_{{Low},{High}}}}}} \\ {\cong {\rho_{\beta_{0}} \cdot e^{{- k_{s}} \cdot {u_{a}{(t)}} \cdot {u_{p}{(t)}} \cdot u_{f_{{Low},{High}}}}}} \end{matrix}} & (32) \end{matrix}$

The available evidence from the literature suggests that motor impairment shows a strong dependence on stimulation frequency. When this stimulation frequency is sufficiently high, DBS can effectively override the intrinsic pathological activity [Reference 9]. Thus, stimulation frequency is the key parameter that conditions the transition from a saturated to linear relationship in the beta band response to stimulation parameter. A chosen minimum frequency u_(f) _(L) =70 Hz is required in order to reduce the beta activity, whereas above the chosen maximum frequency u_(f) _(H) =130 Hz, a further reduction can be obtained only by increasing the stimulation amplitude and/or pulse-width.

The effect of disturbances will now be considered.

Above there is discussed the modelling of the main characteristics of the temporal evolution of the modulation of the beta band signal caused by the stimulation signal, which is essential a neurological effect at the target area of the brain from which measurements are taken. In addition, a set of other, as yet unmodelled phenomena may be taken into consideration and represented as modelling noise and disturbances. A succinct description of these disturbances is given for a sound completeness of the models proposed, although not essential.

Disturbances may be classified into two categories.

The first category comprises disturbances that are applied to the functional blocks of the modelling unit 30 described above. The first category includes a state disturbance v that is applied to the modulation dynamics block 33 and directly affects the temporal dynamics of the state variables of the dynamic evolution of the gross average of the beta band signal and state variable of the stimulation effect x_(E). The first category also includes a saturation disturbance m that is applied to the modulation saturation block 34 and affects the generation of the saturated signal.

The second category of disturbances comprises external disturbances to the beta band signal. These are of particular importance in the field of DBS because they have the potential to cause significant distortions to the LFP measured from inside the target area. The external disturbance signal generator 36 mentioned above generates an external disturbance signal w representing external disturbances to the beta band signal of the this second category as will now be described in detail.

As shown in FIG. 11, the external disturbance signal generator 36 includes four functional blocks that output respective signals representing different types of external disturbance, as follows.

The external disturbance signal generator 36 includes a stimulation artefact block 50 outputs a signal representing artefacts of the stimulation signal on the signal measured from the human or animal body. These are the main external disturbances and come from the stimulation pulses themselves. Such artefacts can in the worst case be a million times larger than the actual LFP signal recorded from the brain that is typically in the range of 1˜10 μV. Such extremely low signal to noise ratio (SNR) is one of the most important barriers in processing meaningfully signals recorded from the brain whiles simultaneously applying high frequency electrical stimulations.

By way of example, FIGS. 12 and 13 both show the same example, at two different time scales, of a signal measured from the target area during simultaneous stimulation and recording from a PD patient with a DBS implant. As can be seen from FIG. 13 in particular, a single biphasic stimulation pulse is measured almost intact (although with reduced amplitude) despite high common mode rejection in the differential amplification of the recorded brain signal, and several stages of filtering. Such stimulation artefacts may in some circumstances lead to large aliasing effects.

An example of such aliasing effects can be seen for example in FIG. 14 illustrating actual data come from a simultaneous recording and stimulation where the amplitude u_(a)=3.5 V, pulse-with u_(P)=60 μs and frequency u_(f)=130 Hz. FIG. 14 shows that the impacts of stimulation artefacts are particularly deleterious and spread across a large frequency band for a stimulation amplitude u_(a)=3.0 V, pulse-with u_(p)=60 μs and frequency u_(f)=130 Hz. In particular, FIG. 14a shows the main harmonic 130 Hz harmonic as a dark strip. FIG. 14b shows the expected integer harmonics at 260 and 390 Hz also as dark strips, and large number of aliased harmonics as lighter strips. And in FIG. 14c , it is seen that that aliased harmonics are present inside the frequency of interest (0-100 Hz), and especially the beta band (15-30 Hz).

Although not the subject of this application, this type of artefact has let to numerous publications on models to represent it and methods to mitigate it. Nonetheless, the stimulation artefact block 50 outputs a signal representing these artefacts.

The external disturbance signal generator 36 includes a DC-drift bias block 51 outputs a signal representing the DC-drift bias. Such a DC-drift bias appears because of an excess of charge accumulation over time on the electrodes used to measure a signal from the target area and on tissue, due to electrode asymmetry and tissue properties. The DC bias can potentially lead to the destruction of both the electrodes and the tissue, and is an important issue to take into consideration. This issue is particularly present when passive charge balance is used, and even with active charge balance albeit to a lesser level. By way of example FIG. 14 of [Reference 13] shows an example of the complex temporal evolution of the DC-drift bias with offset regulation charge balancer, which seems to follow a second order under damp transfer function as the stimulation pulses are delivered. Because this DC-drift bias is several magnitudes larger than the signal of interest, it can lead to saturation and inadequate brain signal measurements.

The external disturbance signal generator 36 includes an electrocardiogram artefact block 52 that outputs a signal representing electrocardiogram artefacts.

The external disturbance signal generator 36 includes a noise block that outputs a signal representing noise, for example electronic components noise, (typically mains noise including 50/60 Hz harmonics) and electromagnetic interferences due to electrical radiation from external devices. Such different sources of noises add up together giving an elevated noise floor that may corrupt measurements.

A specific example of the model implemented by the functional blocks of the modelling unit 30 will now be given. This section defines the mathematical relationships representing the full standard model, which allows its numerical and electronic implementation, and forms the basis for the state-space representation of the ‘nonlinear (Hammerstein-Wiener) stochastic time-varying differential-algebraic equation’ modelling of how the beta reduction ρ_(β) responds to the electrical stimulation parameters: amplitude u_(a), pulse-with u_(p) and frequency u_(f) [Reference 2].

It is possible to express the transfer function between the state variable (output) x_(D) representing the dynamic beta modulation and the stimulation ‘pulse action’ u_(PA) representing here the input (and indeed the actual stimulation pulse u), when considering at this stage the modulation dynamics block 33 as a time-invariant system, by a second order lowpass system given by equation (24), which is re-written in the standard canonical form in equation (33) allowing the direct use of standard analysis results and derivation of the state-space model [Reference 9].

$\begin{matrix} {{{H_{ED}(s)} = \frac{k_{S} \cdot \omega_{\eta}^{2}}{s^{2} + {2 \cdot \xi \cdot \omega_{\eta} \cdot s} + \omega_{\eta}^{2}}}{{{with}\mspace{14mu} k_{S}} = {k_{E} \cdot k_{D}}}{\omega_{\eta} = {{{\frac{1}{\sqrt{\tau_{E} \cdot \tau_{D}}}\mspace{14mu}\&}\mspace{14mu}\xi} = {\frac{1}{2} \cdot \frac{\tau_{E} + \tau_{D}}{\sqrt{\tau_{E} \cdot \tau_{D}}}}}}} & (33) \end{matrix}$

In particular, from standard analysis [Reference 9], the equivalent time-varying ordinary differential equation expressed by equation (34) is derived directly, to which there is added a zero mean stationary stochastic process v(t) to represent measurement and modelling errors of the state, a time-varying time constant τ_(D) (t) and an overall time-varying static gain k_(S)(t) instead of constant as described above.

$\begin{matrix} {{{{\overset{¨}{x}}_{D}(t)} = {{{- {a_{1}(t)}} \cdot {x_{D}(t)}} - {{a_{2}(t)} \cdot {{\overset{.}{x}}_{D}(t)}} + {{b_{1}(t)} \cdot {u_{PA}(t)}} + {\upsilon(t)}}}{{{{with}\mspace{14mu}{{\overset{.}{x}}_{D}(t)}} = \frac{d\;{x_{D}(t)}}{d\; t}};{{{\overset{¨}{x}}_{D}(t)} = \frac{d^{2}\;{x_{D}(t)}}{d\; t}}}{{a_{1}(t)} = {{\omega_{\eta}^{2}(t)} = \frac{1}{\tau_{E} \cdot {\tau_{D}(t)}}}}{{a_{2}(t)} = {{2 \cdot {\xi(t)} \cdot {\omega_{\eta}(t)}} = {\tau_{E} + {\tau_{D}(t)}}}}{{b_{1}(t)} = {{k_{S} \cdot {\omega_{\eta}^{2}(t)}} = \frac{k_{S}(t)}{\tau_{E} \cdot {\tau_{D}(t)}}}}} & (34) \end{matrix}$

The actual saturated modulation state x_(S) due to stimulation parameters is limited by the Wiener memoryless (nonlinear) saturation function {circumflex over (f)}_(W) defined in equation (29), to which there is added a zero mean stationary stochastic process m(t) to represent also modelling errors of the actual saturated beta reduction factor as defined by equation (35).

x _(s)(t)={circumflex over (f)} _(W)(t,x _(D)(t),u _(a)(t),u _(p)(t),u _(f)(t))+m(t)  (35)

The static algebraic relationship ρ_(β) allows to estimate the reduced beta magnitude ŷ_(β) _(LFP) due to electrical stimulation using equation (15), to which there is added the external disturbances w composed of the stimulation artefact, electrocardiogram artefact and noise; this estimated reduced beta ŷ_(β) _(LFP) is expressed by equation (36).

ŷ _(β) _(LFP) (t)=ρ_(β) ₀ ·e ^(−x) ^(S) ^((t)) ·x _(β) _(LFP) (t)+w(t)  (36)

A mono-biomarker state-space model may be applied as follows.

In order to establish the our mono-biomarker state-space model (based on beta band—β—only), a change of variable is operated as per standard canonical transformation to re-write equation (34) of x_(D) by equation (37) [Reference 9].

$\begin{matrix} {{{x_{3}(t)} = {{{{x_{D}(t)}\mspace{14mu}\&}\mspace{14mu}{x_{4}(t)}} = \;{{\overset{.}{x}}_{D}(t)}}}{\begin{matrix} (a) \\ \; \\ (b) \end{matrix}\left\{ \begin{matrix} {{\overset{.}{x}}_{3}(t)} & = & {{\overset{.}{x}}_{D}(t)} \\ \; & = & {x_{4}(t)} \\ \; & \; & \; \\ {{\overset{.}{x}}_{4}(t)} & = & {{\overset{¨}{x}}_{D}(t)} \\ \; & = & {{{- a_{1}} \cdot {x_{3}(t)}} - {a_{2} \cdot {x_{4}(t)}} + {b_{1} \cdot {u_{PA}(t)}}} \end{matrix} \right.}} & (37) \end{matrix}$

The exact same principle is followed to re-write equation (24) of x_(D) _(High) and x_(D) _(Low) by equation (38).

$\begin{matrix} {{{x_{1}(t)} = {{{{x_{D_{High}}(t)}\mspace{14mu}\&}\mspace{14mu}{x_{2}(t)}} = {{\overset{.}{x}}_{D_{High}}(t)}}}{\begin{matrix} (a) \\ \; \\ (b) \end{matrix}\left\{ \begin{matrix} {{\overset{.}{x}}_{1}(t)} & = & {{\overset{.}{x}}_{D_{High}}(t)} \\ \; & = & {x_{2}(t)} \\ \; & \; & \; \\ {{\overset{.}{x}}_{2}(t)} & = & {{\overset{¨}{x}}_{D_{High}}(t)} \\ \; & = & {{{- a_{1}} \cdot {x_{1}(t)}} - {a_{2} \cdot {x_{2}(t)}} + {b_{1} \cdot {u_{{PA}_{High}}(t)}}} \end{matrix} \right.}} & (38) \end{matrix}$

Rewriting x_(D) _(Low) from equation (24) provides equation (39).

$\begin{matrix} {{x_{5}(t)} = {{{{x_{D_{Low}}(t)}\mspace{14mu}\&}\mspace{14mu}{x_{6}(t)}} = {{{\overset{.}{x}}_{D_{Low}}(t)}\begin{matrix} (a) \\ \; \\ (b) \end{matrix}\left\{ \begin{matrix} {{\overset{.}{x}}_{5}(t)} & = & {{\overset{.}{x}}_{D_{Low}}(t)} \\ \; & = & {x_{6}(t)} \\ \; & \; & \; \\ {{\overset{.}{x}}_{6}(t)} & = & {{\overset{¨}{x}}_{D_{Low}}(t)} \\ \; & = & {{{- a_{1}} \cdot {x_{5}(t)}} - {a_{2} \cdot {x_{6}(t)}} + {b_{1} \cdot {u_{{PA}_{Low}}(t)}}} \end{matrix} \right.}}} & (39) \end{matrix}$

The mono-biomarker continuous-time ‘nonlinear (Hammerstein-Wiener) stochastic time-varying differential-algebraic state-space equation’ (see below for the demonstration of its differential-algebraic nature) is given by equation (40), where a lowercase letter represent a unidimensional variable, uppercase for a vector and bold uppercase for a matrix.

$\begin{matrix} {\begin{matrix} {{U(t)} = {{\hat{f}}_{H}\left( {t\ ,{u_{Na}(t)},{u_{Np}(t)},{u_{Nf}(t)}} \right)}} \\ {= \left\lbrack {u_{a},u_{p},u_{f}} \right\rbrack^{T}} \end{matrix}{{U_{PA}(t)} = {f_{PA}\left( {t,{U(t)},u_{f_{High}},u_{f_{Low}}} \right)}}{{\overset{.}{X}(t)} = {{{A(t)} \cdot {X(t)}} + {{B(t)} \cdot {U_{PA}(t)}} + {F \cdot {V(t)}}}}{{Y(t)} = {C \cdot {X(t)}}}{{x_{S}(t)} = {{{\hat{f}}_{W}\left( {t,{Y(t)}} \right)} + {m(t)}}}{{{\hat{y}}_{\beta_{LFP}}(t)} = {{\rho_{\beta_{0}} \cdot e^{- {x_{S}{(t)}}} \cdot {x_{\beta_{LFP}}(t)}} + {w(t)}}}} & (40) \end{matrix}$

From equation (40), U represents the limited stimulation pulse (here expressed as a vector) to a safe clinical range of the original neuromodulation pulse parameters u_(Na,p,f) as defined by equation (28). U_(PA) is the ‘pulse action’ vector defined by equation (41) based on equations (20) and (30).

$\begin{matrix} \begin{matrix} {{U_{PA}(t)} = {\begin{bmatrix} {u_{PA_{High}}(t)} \\ {u_{PA}(t)} \\ {u_{PA_{Low}}(t)} \end{bmatrix} = {f_{PA}\left( {t,{U(t)},u_{f_{High}},u_{f_{Low}}} \right)}}} \\ {= {\begin{bmatrix} u_{f_{High}} \\ {u_{f}(t)} \\ u_{f_{Low}} \end{bmatrix} \cdot \begin{bmatrix} {u_{a}(t)} & {u_{p}(t)} \end{bmatrix} \cdot \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix} \cdot \begin{bmatrix} {u_{a}(t)} \\ {u_{p}(t)} \end{bmatrix}}} \\ {= \begin{bmatrix} {{u_{a}(t)} \cdot {u_{p}(t)} \cdot u_{f_{High}}} \\ {{u_{a}(t)} \cdot {u_{p}(t)} \cdot {u_{f}(t)}} \\ {{u_{a}(t)} \cdot {u_{p}(t)} \cdot u_{f_{Low}}} \end{bmatrix}} \end{matrix} & (41) \end{matrix}$

X is the state vector, {dot over (X)} is the derivative of the state vector defined by equation (42) based on equations (37), (38) and (39). In equation (42), the vector V is a zero mean stationary stochastic process, whereas Y is the output vector.

$\begin{matrix} {\begin{matrix} {{X(t)} = \begin{bmatrix} {x_{1}(t)} & {x_{2}(t)} & {x_{3}(t)} & {x_{4}(t)} & {x_{5}(t)} & {x_{6}(t)} \end{bmatrix}^{T}} \\ {= \begin{matrix} \left\lbrack {x_{D_{High}}(t)} \right. & {{\overset{.}{x}}_{D_{High}}(t)} & {x_{D}(t)} & {{\overset{.}{x}}_{D}(t)} \\ x_{D_{Low}} & \left. {{\overset{.}{x}}_{D_{Low}}(t)} \right\rbrack^{T} & \; & \; \end{matrix}} \end{matrix}\begin{matrix} {{V(t)} = \begin{bmatrix} {v_{High}(t)} & {v(t)} & {v_{Low}(t)} \end{bmatrix}^{T}} \\ {{Y(t)} = \begin{bmatrix} {x_{1}(t)} & {x_{3}(t)} & {x_{5}(t)} \end{bmatrix}^{T}} \\ {= \begin{bmatrix} {x_{D_{High}}(t)} & {x_{D}(t)} & {x_{D_{Low}}(t)} \end{bmatrix}^{T}} \end{matrix}} & (42) \end{matrix}$

From equation (40), A is the state matrix, B is the input matrix, F is the state measurement and modelling error matrix, C is the output matrix and y the scalar output. These matrices are defined in equation (43).

Finally, from equation (40), the saturated modulation state x_(S) is defined by equations (29), (30), (32) and (35); whereas the estimated reduced beta band ŷ_(β) _(LFP) is defined by equations (15) and (36).

$\begin{matrix} {{{A(t)} = \begin{bmatrix} 0 & 1 & 0 & 0 & 0 & 0 \\ {- {a_{1}(t)}} & {- {a_{2}(t)}} & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & {- {a_{1}(t)}} & {- {a_{2}(t)}} & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & {- {a_{1}(t)}} & {- {a_{2}(t)}} \end{bmatrix}}{{B(t)} = {{{\begin{bmatrix} 0 & 0 & 0 \\ {b_{1}(t)} & 0 & 0 \\ 0 & 0 & 0 \\ 0 & {b_{1}(t)} & 0 \\ 0 & 0 & 0 \\ 0 & 0 & {b_{1}(t)} \end{bmatrix}\&}\mspace{14mu} F} = \begin{bmatrix} 0 & 0 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix}}}{C = \begin{bmatrix} 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 \end{bmatrix}}} & (43) \end{matrix}$

The model given in equation (40) is based on a single biomarker; here the beta band β, but defined with two variables: the dynamic evolution x_(D) of the beta envelop and its derivative {dot over (x)}_(D).

As an important note, Wills et al. have proposed an approach to identify automatically and online Hammerstein-Wiener state-space models [Reference 2]. This approach could be used with the model in order to update automatically its time-varying parameters, as well as individualised it to a particular person. Also, data presented by Qian et al. [Reference 3] used for deriving the steady-state behaviour of our model is limited to a narrow region of the complex nonlinear space of the beta response to stimulation as suggested by the mean field model of the basal ganglia-thalamocortical system (BGTCS); this model has a structure and parameters based on physiology and anatomy, and has been shown to account for some electrophysiological correlates of Parkinson's disease (PD) [Reference 10], [Reference 11]. It is expected that the time-varying static gain k_(S)(t) to be dependent not only on the time variable, but also on the stimulation

parameters: k_(S)(t)=f_(S)(t,u_(a)(t),u_(p)(t),u_(f) (t)). In this way, it would possible to replicate nonlinear and time dependent behaviours of beta response to stimulation as studied by Grado et al. [Reference 12]. Thus, our proposed model is a global and steady-state approximation of the complex nonlinear behaviour of beta response to stimulation, that can be easily adapted by setting the adequate time constant τ_(D) (t) and static gain k_(S)(t) to the region of interest.

In order to establish the structure of the model (ordinary differential equation (ODE) vs. differential-algebraic equation (DAE), it is evaluated if the determinant of its Jacobian matrix is singular (non-invertible) leading to a differential-algebraic equation (DAE), or non-singular (invertible) leading to an ordinary differential equation (ODE). To express the Jacobian matrix, the situation is considered when the system is not saturated (in the linear region of both Hammerstein and Weiner saturation functions {circumflex over (f)}_(H) and {circumflex over (f)}_(W) respectively) with no disturbances; therefore when x_(S)=x_(D)=z₁, {dot over (x)}_(D)=z₂ and v=m=w=0. Equations (36) and (37) are combined to set the non-saturated system of equations (44). A change of variable from x to z is done in order to avoid confusion.

F ₁ =ż ₁(t)−z ₂(t)=0

F ₂ =a ₁ ·z ₁(t)±ż ₂(t)+a ₂ ·z ₂(t)−b ₁ ·u _(PA)(t)=0

F ₃=−ρ_(β) ₀ ·e ^(−z) ^(i) ^((t)) ·x _(β) _(LFP) (t)+z ₃(t)=0  (44)

Setting the state vector Z=[z₁ z₂ z₃]^(T), the system from equation (44) can be re-written on its matrix form in equation (45).

$\begin{matrix} {{F\left( {t,{Z(t)},{\overset{.}{Z}(t)}} \right)} = {\begin{bmatrix} {F_{1}\left( {t,{Z(t)},{\overset{.}{Z}(t)}} \right)} \\ {F_{2}\left( {t,{Z(t)},{\overset{.}{Z}(t)}} \right)} \\ {F_{3}\left( {t,{Z(t)},{\overset{.}{Z}(t)}} \right)} \end{bmatrix} = 0}} & (45) \end{matrix}$

The determinant of the Jacobian matrix |∂F/∂Ż| of the system F(t, z(t), Ż(t)) given by equation (46) is singular (non-invertible), leading therefore to conclude that our model has the structure of a differential-algebraic equation (DAE).

$\begin{matrix} {{\frac{\partial F}{\partial\overset{.}{Z}}} = {{\begin{matrix} \frac{\partial F_{1}}{\partial{\overset{.}{z}}_{1}} & \frac{\partial F_{1}}{\partial{\overset{.}{z}}_{2}} & \frac{\partial F_{1}}{\partial{\overset{.}{z}}_{3}} \\ \frac{\partial F_{2}}{\partial{\overset{.}{z}}_{1}} & \frac{\partial F_{3}}{\partial{\overset{.}{z}}_{2}} & \frac{\partial F_{3}}{\partial{\overset{.}{z}}_{3}} \\ \frac{\partial F_{3}}{\partial{\overset{.}{z}}_{1}} & \frac{\partial F_{3}}{\partial{\overset{.}{z}}_{2}} & \frac{\partial F_{3}}{\partial{\overset{.}{z}}_{3}} \end{matrix}} = {{\begin{matrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{matrix}} = 0}}} & (46) \end{matrix}$

A multi-biomarker state-space model may be used as follows.

Finally, the model given by the state-space equation (40) can be easily extend by adding additional biomarkers of Parkinson's disease (PD). In order to exemplify this, let us consider that three biomarkers of PD have been retained: the beta band noted with the index β and defined by the state variable X_(β), a putative biomarker Δ (which could be for example the alpha band, gamma band, or a combination of frequency bands) defined by the state variable x_(λ), and the tremor T measured by an accelerometer attached to the subject's wrist defined by the state variable X_(T). Supposing that all three biomarkers respond on their own way to the same stimulation command U, and are not coupled to each other (i.e. do not interact with each other). In this case, the multi-biomarker continuous-time ‘nonlinear (Hammerstein-Wiener) stochastic time-varying differential-algebraic state-space model in equation (47) is given by the same structure of the equation (40), but extended to take into consideration the new biomarkers X_(λ) and X_(T).

$\begin{matrix} {\left\{ {\begin{matrix} {{U(t)}\  = {{\hat{f}}_{H}\left( {t,{u_{Na}(t)},{u_{Np}(t)},{u_{Nf}(t)}} \right)}} \\ {{U_{PA}(t)} = {f_{PA}\left( {t,{U(t)},u_{f_{High}},u_{f_{Low}}} \right)}} \end{matrix}\left\{ {\begin{matrix} {{{\overset{.}{X}}_{\beta}(t)} = {{{A_{\beta}(t)} \cdot {X_{\beta}(t)}} + {{B_{\beta}(t)} \cdot {U_{PA}(t)}} + {F_{\beta} \cdot {V_{\beta}(t)}}}} \\ {{{\overset{.}{X}}_{\lambda}(t)} = {{{A_{\lambda}(t)} \cdot {X_{\lambda}(t)}} + {{B_{\lambda}(t)} \cdot {U_{PA}(t)}} + {F_{\lambda} \cdot {V_{\lambda}(t)}}}} \\ {{{\overset{.}{X}}_{T}(t)} = {{{A_{T}(t)} \cdot {X_{T}(t)}} + {{B_{T}(t)} \cdot {U_{PA}(t)}} + {F_{T} \cdot {V_{T}(t)}}}} \end{matrix}\left\{ {{\begin{matrix} {{Y_{\beta}(t)} = {C_{\beta} \cdot {X_{\beta}(t)}}} \\ {{Y_{\lambda}(t)} = {C_{\lambda} \cdot {X_{\lambda}(t)}}} \\ {{Y_{T}(t)} = {C_{T} \cdot {X_{T}(t)}}} \\ {{Y_{C}(t)} = \begin{bmatrix} {Y_{\beta}(t)} & {Y_{\lambda}(t)} & {Y_{T}(t)} \end{bmatrix}^{T}} \end{matrix}\mspace{14mu}{X_{S}(t)}} = {{{{\hat{F}}_{W}\left( {t,{Y_{C}(t)}} \right)} + {{P \cdot {M(t)}}{\hat{Y}(t)}}} = {{{F_{A}\left( {t,{X_{S}(t)}} \right)} \cdot {X_{A}(t)}} + {Q \cdot {W(t)}}}}} \right.} \right.} \right.} & (47) \end{matrix}$

From equation (47), the first relation {circle around (1)} defines the command variables. U is the limited stimulation pulse parameter vector derived from the original neuromodulation pulse parameters u_(Na,p,f) as defined by equation (28). U_(PA) is the ‘pulse action’ vector defined by equation (41). For the same reason as already mentioned above, for the efficient implementation of this model for numerical simulation, it is completely equivalent in term of steady-state behaviour to use the exact stimulation pulses as generated by an actual neurostimulator, or to use the ‘pulse action’ U_(PA) shown in equation (41). The advantage of using this ‘pulse action’ U_(PA) rather than the actual stimulation pulse is that the simulation will be much faster.

The second relation {circle around (2)} from equation (47) defines the multivariable state-space equation here represented as three sub-set of equations for more clarity; they can be indeed grouped into a single expression by simply concatenating them vertically. X_(β,λ,T) are the state vectors of the three states variables considered in this case: the beta band, the putative biomarker λ, and the tremor T respectively; {dot over (X)}_(β, λ,T) are their respective derivatives, and both are defined by equation (48). Matrices A_(β,λ,T) the state matrices, have exactly the same structure as the matrix A given by equation (43), where a₁ and a₂ are replaced by their equivalent variables: a₁→a_(β,λ,T) and a₂→a_(β,λ,T) ₂ . Similarly, matrices B_(β,λ,T) the input matrices, are each defined exactly as the matrix B given by equation (43), and operating the same variable renaming as per above: b₁→b_(β,λ,T) ₁ . Whereas, matrices F_(β,λ,T), the state measurement and modelling error matrices, are each defined exactly as the matrix F given by equation (43): F_(β,λ,T)=F.

$\begin{matrix} {{{X_{\beta,\lambda,T}(t)} = {\begin{matrix} \left\lbrack {x_{\beta,\lambda,T_{1}}(t)} \right. & {x_{\beta,\lambda,T_{2}}(t)} & {x_{\beta,\lambda,T_{3}}(t)} \\ {x_{\beta,\lambda,T_{4}}(t)} & {x_{\beta,\lambda,T_{5}}(t)} & \left. {x_{\beta,\lambda,T_{6}}(t)} \right\rbrack^{T} \end{matrix} = \begin{matrix} \left\lbrack {x_{\beta,\lambda,T_{D_{High}}}(t)} \right. & {{\overset{.}{x}}_{\beta,\lambda,T_{D_{High}}}(t)} & {x_{\beta,\lambda,T_{D}}(t)} \\ {{\overset{.}{x}}_{\beta,\lambda,T_{D}}(t)} & {x_{\beta,\lambda,T_{D_{Low}}}(t)} & \left. {{\overset{.}{x}}_{\beta,\lambda,T_{Low}}(t)} \right\rbrack^{T} \end{matrix}}}\mspace{79mu}{{V_{\beta,\lambda,T}(t)} = \begin{bmatrix} {v_{\beta,\lambda,T_{High}}(t)} & {v_{\beta,\lambda,T}(t)} & {v_{\beta,\lambda,T_{Low}}(t)} \end{bmatrix}^{T}}} & (48) \end{matrix}$

Vectors V_(β,λ,T) are zero-mean stationary stochastic processes to represent state measurement and modelling errors.

The third relation {circle around (3)} from equation (47) represents the multivariable output equation, where Y_(β,λ,T) are the output vectors defined by equation (49). Matrices C_(β,λ,T), the output matrices, are each defined exactly as the matrix C given by equation (43):

$\begin{matrix} {C_{\beta,\lambda,T} = {C.\begin{matrix} {{Y_{\beta,\lambda,T}(t)} = \begin{bmatrix} {x_{\beta,\lambda,T_{1}}(t)} & {x_{\beta,\lambda,T_{3}}(t)} & {x_{\beta,\lambda,T_{5}}(t)} \end{bmatrix}^{T}} \\ {= \begin{bmatrix} {x_{\beta,\lambda,T_{D_{High}}}(t)} & {x_{\beta,\lambda,T_{D}}(t)} & {x_{\beta,\lambda,T_{D_{Low}}}(t)} \end{bmatrix}^{T}} \end{matrix}}} & (49) \end{matrix}$

From equation (47), the fourth relation {circle around (4)} is the multivariable dynamic Weiner saturation relationships which are defined by equation (50), where X_(S) is the saturated state dynamics vector, {circumflex over (F)}_(W) is the dynamic Weiner saturation vector, P and M are respectively the modelling errors of the actual saturated state dynamics matrix and vector.

$\begin{matrix} {{{\mspace{31mu}{X_{S}(t)}} = {{{\hat{F}}_{W}\left( {t,{Y_{C}(t)}} \right)} + {P \cdot {M(t)}}}}{with}{{X_{S}(t)} = {{{\begin{bmatrix} {x_{S_{\beta}}(t)} \\ {x_{S_{\lambda}}(t)} \\ {x_{S_{T}}(t)} \end{bmatrix}\&}\mspace{14mu}{F_{W}\left( {t,.} \right)}} = \begin{bmatrix} {{\hat{f}}_{W_{\beta}}\left( {t,{Y_{\beta}(t)}} \right)} \\ {{\hat{f}}_{W_{\lambda}}\left( {t,{Y_{\lambda}(t)}} \right)} \\ {{\hat{f}}_{W_{T}}\left( {t,{Y_{T}(t)}} \right)} \end{bmatrix}}}{P = {{{\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}\&}\mspace{14mu}{M(t)}} = \begin{bmatrix} {m_{\beta}(t)} \\ {m_{\lambda}(t)} \\ {m_{T}(t)} \end{bmatrix}}}} & (50) \end{matrix}$

Finally, from equation (47) the fifth relation {circle around (5)} is the static algebraic equation, where Ŷ is the estimated output vector, F_(A) is the algebraic function matrix, X_(S) is the saturated dynamic state vector, X_(A) is the algebraic input vector, Q and W are respectively the external disturbance matrix and vector. Those vectors and matrices are defined by equation (51).

$\begin{matrix} {{{\mspace{31mu}{\hat{Y}(t)}} = {{{F_{A}\left( {t,{X_{S}(t)}} \right)} \cdot {X_{A}(t)}} + {Q \cdot {W(t)}}}}{with}{{\hat{Y}(t)} = {{{\begin{bmatrix} {{\hat{y}}_{\beta_{LFP}}(t)} \\ {{\hat{y}}_{\lambda_{LFP}}(t)} \\ {{\hat{y}}_{T}(t)} \end{bmatrix}\&}\mspace{14mu}{X_{A}(t)}} = \begin{bmatrix} {x_{\beta_{LFP}}(t)} \\ {x_{\lambda_{LFP}}(t)} \\ {x_{T}(t)} \end{bmatrix}}}{{F_{A}\left( {t,.} \right)} = \begin{bmatrix} {f_{A_{\beta}}\left( {t,{x_{S_{\beta}}(t)}} \right)} & 0 & 0 \\ 0 & {f_{A_{\lambda}}\left( {t,{x_{S_{\lambda}}(t)}} \right)} & 0 \\ 0 & 0 & {f_{A_{T}}\left( {t,{x_{S_{T}}(t)}} \right)} \end{bmatrix}}{Q = {{{\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}\&}\mspace{14mu}{W(t)}} = \begin{bmatrix} {w_{\beta}(t)} \\ {W_{\lambda}(t)} \\ {w_{T}(t)} \end{bmatrix}}}} & (51) \end{matrix}$

In equation (51), f_(A) _(β,λ,T) are the actual algebraic function used for predicting each of the estimated state variable, and are defined in equation (52).

$\begin{matrix} \left\{ \begin{matrix} {{f_{A_{\beta}}\left( {t,{x_{S_{\beta}}(t)}} \right)} = {\rho_{\beta_{0}} \cdot e^{- {x_{s_{\beta}}{(t)}}} \cdot {x_{\beta}(t)}}} \\ {{f_{A_{\lambda}}\left( {t,{x_{S_{\lambda}}(t)}} \right)} = {\rho_{\lambda_{0}} \cdot e^{- {x_{s_{\lambda}}{(t)}}} \cdot {x_{\lambda}(t)}}} \\ {{f_{A_{T}}\left( {t,{x_{S_{T}}(t)}} \right)} = {\rho_{T_{0}} \cdot e^{- {x_{T_{\lambda}}{(t)}}} \cdot {x_{T}(t)}}} \end{matrix} \right. & (52) \end{matrix}$

It should be highlighted here that the state-space model is not unique and depends on particular choices related to the modelling goals. As already mentioned, in the following definition, it is also considered that the three biomarkers beta β, the putative second biomarker Δ and the tremor T are decoupled from each other; i.e. they do not interact. This does not have to be the case, and in the situation of coupled biomarkers our multivariable model structure applies as it, and one has only to adapt the actual definition of the vectors and matrices used accordingly.

Finally, by applying classical continuous-time to discrete-time transformation, there is obtained the discrete-time equivalent of the continuous-time mono- or multi-biomarker ‘nonlinear (Hammerstein-Wiener) stochastic time-varying differential-algebraic state-space model’ given respectively in equations (40) and (47). It is indeed these discrete-time expressions that are actually implemented in a software implementation, as discussed further below.

The emulation apparatus 1 may in general be implemented entirely in software, entirely in hardware or in a combination thereof by implementing different functional blocks in hardware or software. Some key aspects to facilitate the implementation of the software and hardware emulation are highlighted as follows.

For a software implementation, the emulation apparatus 1 may be implemented by a computer program capable of execution by a computer apparatus. The computer program is configured so that, on execution, it causes the computer apparatus to operate as the emulation apparatus 1 and perform the emulation method. In this case, the emulation apparatus 1 processes digital signals representing the various signals mentioned above.

The computer apparatus, where used, may be any type of computer system but is typically of conventional construction. The computer program may be written in any suitable programming language. The computer program may be stored on a computer-readable storage medium, which may be of any type, for example: a recording medium which is insertable into a drive of the computing system and which may store information magnetically, optically or opto-magnetically; a fixed recording medium of the computer system such as a hard drive; or a computer memory.

In one convenient implementation, the emulation apparatus 1 may be implemented by a computer program in a simulation environment such as Matlab/Simulink.

In general, the practical realisation of the emulation apparatus 1 in software is straightforward merely by implementing the different function blocks described above by corresponding software blocks. Some optional details are as follows.

The implementation of the prior signal generator 10 can be done in two different ways. First, one can generate the prior signal as synthetic data that represent some aspects of current understanding of the LFP characteristics. In such a case, this function generates the synthetic envelope of the beta band activity either as the envelope of the power of the beta activity together with a carrier represented by a sinewave or a sum of sinewaves used to represent the beta band. This carrier will be then temporally multiplied by the modulated envelope (modulated by the stimulation command) in the modulation algebraic function.

An alternative solution is to use data directly recorded from an actual patient (i.e. a person with Parkinson's disease) when the stimulation is OFF. After adequate filtering and processing of the beta power envelope, the data can be used as the signal that will be modulated by the stimulation.

In addition, both the synthetic and actual participant data can be also directly defined at the temporal/voltage domain as opposed to the frequency/power domain as described above. Depending on the choice of the temporal vs. frequency domain, the correct set of parameters needs to be used as described above.

Turning to the modelling unit 30, the command saturation block 31 may be implemented by a classical saturation function.

The stimulation effect block 32 may be implemented by a first order system. From equation (33), a simple approach is to set k_(D)=1, leading to express k_(E) by equation (53).

k _(D)=1⇒k _(E) =k _(S)  (53)

Since the numerical value of k_(S) is different depending on the domain (frequency vs. temporal) of the LFP provided by the LFP Generator function, k_(E) can be seen as a variable parameter with regard to the domain of functioning (frequency vs. temporal).

The modulation dynamics block 33 may be represented in its temporal or recurrent form for digital implementation. As mentioned above, since the modulation dynamics function is a time-variant first order system given by equation (27), it cannot be represented by a classical Laplace transfer function. An example of such implementation under Matlab/Simulink is presented in FIG. 15. In such case, there is a need to choose the right method of integration implemented by the discrete-time integrator. For instance, under Matlab/Simulink with a fixed-step discrete solver (no continuous state), the forward Euler integration method could be chosen to avoid algebraic loop during the initialisation stage. Alternatively, one can decide to consider a stationary model for a given period where the model parameters are seen as constant; thus, allowing the modulation block to be implemented by classical Laplace transform transfer function.

The modulation saturation block 34 may be implemented by a dynamic saturation function.

The modulation algebraic block 35 may be implemented directly by equation (15).

FIG. 16 shows an example of signals developed within a software implementation of the emulation apparatus. This example uses data from the actual participant between 0 and 114 seconds when the stimulation is OFF, which are repeated until the end of the simulation at 1420 seconds. The top plot shows the estimated beta power LFP response to stimulation ŷ_(β) _(LFP) , whiles the second plot (from top) shows the actual beta power response y_(δ) _(LFP) recorded from the participant. The third plot shows the saturated modulation x_(S) and the modulation algebraic ρ_(β) _(P) calculated by the model. The fourth plot shows when the stimulation is ON or OFF together with the actual stimulation amplitude u_(a) applied to the participant brain. For modelling, the signal is the same.

For a hardware implementation, the emulation apparatus 1 may be implemented using standard electronic components, for example as follows.

The emulation apparatus 1 may be implemented either in an analogue, digital or mixed-design fashion. In the following example, an analogue implementation is described, but could be combined with the software implementation of any of the functional blocks as described above if a mixed-design approach is chosen. In that case, typically a supervisory computer will control the emulator, although this is not required, while a processor is used to implement the digital parts.

The prior signal generator 10 can use directly either the synthetic or actual participant data signal produced by the software implementation. Another possibility for the prior signal generator 10 to be implemented by an external signal generator, or an arbitrary wave generator (AWG) or another computer with a digital-to-analogue converter if it is desired to totally desynchronise the hardware emulation apparatus from the supervising computer. The latter option guarantees a complete desynchronisation between the LFP generator and the hardware emulation apparatus 1. Such a situation can be important if the hardware emulation apparatus 1 is used in closed-loop fashion to implement and test new advanced control algorithm for managing the symptoms of PD.

Turning to the modelling unit 30, the test signal is typically a temporal signal generated by the test signal generator 21, which may be part of an external neurostimulation device under test.

The command saturation block 31 may be implemented by a clamp operational amplifier or by a saturation circuit which operates to limit the voltage amplitude of the stimulation pulse. Limiting the pulse-width and frequency is a more complex task that is best performed at the supervisory computer level, or at the level of the external neurostimulation device, if it is used.

An alternative situation where the test signal represents parameters representing the waveform of the stimulation signal is for the command saturation block 31 to be implemented as a neurostimulation device which generates temporal stimulation signal in accordance with the supplied parameters, in which case the limitation function may be implemented by control of the supplied parameters prior to generation of the temporal signal.

The stimulation effect block 32 may be implemented by a circuit of the type shown in FIG. 17 and arranged as follows.

The first stage of the stimulation effect block 32 is a rectifier 50 which can be either a classical half-wave rectifier if the negative pulse is considered not to be physiologically meaningful, but simply for charge balance at the neural level, or otherwise by a full-wave rectifier.

The next stage of the stimulation effect block 32 comprises first and second resistors 51 and 52 and a switch 53 which implement equation (20) of the ‘pulse action’ u_(PA) noting the very small duty cycle (T_(ON)/T_(ON)=0.0078) of the standard stimulation pulse (60 μs at 130 Hz). The first resistor 51 is connected to the output from the rectifier 50 while the second resistor 52 is connected to ground. The switch 53 switches synchronously with the stimulation pulses 3, connecting to the first resistor 51 when the pulse is on and to the second resistor 52 when the pulse is off. This approximates u_(PA) at the pulse level, which is required especially when one desires to drive the hardware emulation apparatus 1 by an external third-party neurostimulation device as the test signal generator 21. The output of the switch 53 is connected to a capacitor 54 which is connected to ground and is therefore charged through the first resistor 51 when the stimulation pulse is ON, and discharged through the second resistor 52 when the stimulation pulse is OFF.

By choosing the resistance R_(C) of the first capacitor 51 and resistance R_(D) of the second capacitor 52 such that R_(D)>>R_(C), the brief charge acquired when the stimulation is ON (typically 60 μs) is ‘preserved’ to a certain level when the stimulation is OFF (typically around 7.6 ms for a stimulation frequency of 130 Hz). This avoids the capacitor C discharging too much or completely when the pulse is OFF, which in turn generates a more stable average voltage across the capacitor v_(C)>0 as shown schematically in FIG. 18.

The output of capacitor 54 is connected to a low pass filter 55 which extracts the ‘average effect’ Ū_(E), and also used to implement the transfer function H_(E) of the ‘stimulation effect’ x_(E) given by equation (18) by adding an amplification stage 56 after the low pass filter 55.

The modulation dynamics block 33 may be implemented by a tunable lowpass filter based on a voltage-controlled amplifier (VCA), which is used to implement the variable time constant τ_(D)(t) of the stimulation modulation dynamic. In such case, the VCA serves as a variable-gain of the voltage-controlled lowpass filter. Alternatively, one of many alternative ways to implement a voltage-controlled filter (VCF) may be implemented.

In order to implement the variable gain k_(D) (t) of the stimulation modulation dynamic, a classical voltage-controlled amplifier (VCA) can be used.

The modulation saturation block 34 requires a dynamic saturation function where both the lower and upper limits can be dynamically set. Thus, the modulation saturation block 34 may be implemented by a voltage clamp operational amplifier or an equivalent circuit.

The modulation algebraic block 35, when providing an exponential function, may be implemented by a voltage-controlled amplifier (VCA), or by a commercially available integrated circuit that directly offers an exponential transfer function.

In the above example, the electrophysiological signal is a beta band signal which is an example of a signal representing a frequency domain parameter. However, as an alternative, the electrophysiological signal represented by the prior signal may be the LFP signal itself, which is a voltage measured from the target area, or more generally any signal measured from the target area. This is possible, with appropriate adaption of the model implemented by the emulation apparatus 1, because the frequency domain parameter is derived in a linear manner from the measured signal. In this case, the emulation signal output from the emulation apparatus is similarly the signal measured from the target area derived under the influence of the stimulation signal. In this case, if the frequency domain parameter, for example the beta band signal, is of interest, then emulation apparatus 1 may further comprise a frequency domain processing unit (not shown) which processes the emulation signal in the frequency domain to derive a processed emulation signal representing a frequency domain parameter of the electrophysiological signal derived under the influence of the stimulation signal.

FIG. 19 shows an example of signals developed within a hardware implementation of the emulation apparatus. FIG. 20 shows the same hardware emulated signal as FIG. 19 but magnified for the time period between 18 m 40 s and 22 m 90 s. FIG. 21 shows the same hardware emulated signal as FIG. 19 but magnified for the time period between 20 m 11 s and 20 m 43 s. FIG. 22 shows the same hardware emulated signal as FIG. 19 but magnified for the time period between 20 m 18 s and 20 m 27 s. The data was recorded with a PicoScope 5442B and the PicoScope software (version 6.13.6.3775). The plots show the actual stimulation amplitude 60 and the beta power LFP estimated oscillations 61, the beta power LFP initial envelope 62 and the beta power LFP estimated envelope 63.

This example is the same as above, but this time the modulation level is determined by the hardware implementation. In particular, the modulation is derived directly from the actually generated stimulation pulses whose amplitude is directly controlled by the actual stimulation amplitude u_(a) applied to the participant brain. The only difference is that, when the stimulator is turned OFF, the minimum amplitude u_(a) _(OFF) determined by the equation below:

$\begin{matrix} {{u_{a_{OFF}}(V)} = {- \frac{\ln\left( \frac{\rho_{\%}}{\rho_{0}} \right)}{k_{E} \cdot k_{D} \cdot u_{p_{OFF}} \cdot u_{f_{OFF}}}}} & (54) \end{matrix}$

The minimum amplitude u_(a) _(OFF) is necessary to guarantee that when the stimulator is turned OFF, the emulator calculates the right modulation amplitude, which the modulization has shown to be slightly higher than the actual amplitude of the beta activity recorded from the patient. For the current patient results shown here, u_(a) _(OFF) ≈1.055 V.

This real-world data shows that the hardware emulator can remarkably well replicate actual electrical data recorded from actual patient brain, and therefore offers accurate patient brain activity emulation.

FIG. 23 shows an example of signals developed within a hardware implementation of the emulation apparatus in closed-loop. FIG. 24 shows the same hardware emulated signal as FIG. 23 but magnified for the time period between 58 s and 1 m 8 s. The plots show the actual stimulation amplitude 60 and the beta power LFP estimated oscillations 61, the beta power LFP initial envelope 62 and the beta power LFP estimated envelope 63.

This example implements the current state-of-the-art in closed-loop DBS in Parkinson's disease disclosed in [Reference 14]. Contrary to [Reference 14], in this example, we set two threshold values 64 and 65 for the beta power LFP estimated envelope 63, the higher threshold 64 being at 0.75 (representing here the classically used 75% percentile threshold value as in [Reference 1]), and the lower threshold 65 being at 0.5 (representing here therefore 50% percentile).

When the temporal beta burst activity increases above the higher threshold 64, the stimulation is turned ON with an amplitude of 3 V, pulse-width of 60 μs and at a frequency of 130 Hz as with current standard in clinical applications. Then, when the temporal beta (envelope) activity decreases below the lower threshold 65, the stimulation is turned OFF again.

This real world data shows that the emulation apparatus is able to replicate closely the switching pattern found in the literature during an aDBS control algorithm as disclosed in [Reference 14].

Overall, these open- and closed-loop results demonstrate the potential of the software and hardware emulation apparatuses to provide the state-of-the art in brain signal emulation to support the design and real-time implementation of advanced control algorithms for treating neurophysiological disorders in human.

REFERENCES

-   [Reference 1] Tinkhauser, G., Pogosyan, A., Little, S., Beudel, M.,     Herz, D. M., Tan, H., & Brown, P., (2017), «The modulatory effect of     adaptive deep brain stimulation on beta bursts in parkinson's     disease», Brain, vol. 140, no 4, p. 1053-1067, Web:     https://academic.oup.com/brain/article/140/4/1053/2993763 -   [Reference 2] Wills, A., Schön, T. B., Ljung, L., & Ninness, B.,     (2013), «Identification of hammerstein-wiener models», Automatica,     vol. 49, no 1, p. 70-81, Web:     http://www.sciencedirect.com/science/article/pii/S0005109812004815 -   [Reference 3] Qian, X., Chen, Y., Feng, Y., Ma, B., Hao, H., & Li,     L., (2017), «A method for removal of deep brain stimulation artifact     from local field potentials», IEEE transactions on neural systems     and rehabilitation engineering: a publication of the IEEE     Engineering in Medicine and Biology Society, vol. 25, no 12, p.     2217-2226. -   [Reference 4] Koss, A. M., Alterman, R. L., Tagliati, M., &     Shils, J. L., (2005), «Calculating total electrical energy delivered     by deep brain stimulation systems», Annals of Neurology, vol. 58, no     1, p. 168-168, Web: http://doi.wiley.com/10.1002/ana.20525 -   [Reference 5] Oppenheim, A. V., Willsky, A. S., & Nawab, S. H.,     (1997), «Signals & systems», 2nd ed. Upper Saddle River, N.J:     Prentice Hall. -   [Reference 6] Hutcheon, B. & Yarom, Y., (2000), «Resonance,     oscillation and the intrinsic frequency preferences of neurons»,     Trends in Neurosciences, vol. 23, no 5, p. 216-222, Web:     http://linkinghub.elsevier.com/retrieve/pii/S0166223600015472 -   [Reference 7] Grossman, N., Bono, D., Dedic, N., Kodandaramaiah, S.     B., Rudenko, A., Suk, H.-J., . . . Boyden, E. S., (2017),     «Noninvasive deep brain stimulation via temporally interfering     electric fields», Cell, vol. 169, no 6, p. 1029-1041.e16, Web:     https://linkinghub.elsevier.com/retrieve/pii/S0092867417305846 -   [Reference 8] Ogata, K., (2002), «Modern control engineering     edition: fourth». New Delhi: Prentice-Hall. -   [Reference 9] Birdno, M. J. & Grill, W. M., (2008), «Mechanisms of     deep brain stimulation in movement disorders as revealed by changes     in stimulus frequency», Neurotherapeutics, vol. 5, no 1, p. 14-25. -   [Reference 10] van Albada, S. J. & Robinson, P. A., (2009),     «Mean-field modeling of the basal ganglia-thalamocortical system.     i», Journal of Theoretical Biology, vol. 257, no 4, p. 642-663, Web:     http://linkinghub.elsevier.com/retrieve/pii/S0022519308006486 -   [Reference 11] van Albada, S. J., Gray, R. T., Drysdale, P. M., &     Robinson, P. A., (2009), «Mean-field modeling of the basal     ganglia-thalamocortical system. ii», Journal of Theoretical Biology,     vol. 257, no 4, p. 664-688, Web:     http://linkinghub.elsevier.com/retrieve/pii/S0022519308006474 -   [Reference 12] Grado, L. L., Johnson, M. D., & Netoff, T. I.,     (2018), «Bayesian adaptive dual control of deep brain stimulation in     a computational model of parkinson's disease», PLOS Computational     Biology, vol. 14, no 12, p. e1006606, Web:     https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi     0.1006606 -   [Reference 13] Sooksood, K., Stieglitz, T., & Ortmanns, M., (2010),     «An active approach for charge balancing in functional electrical     stimulation», IEEE Transactions on Biomedical Circuits and Systems,     vol. 4, no 3, p. 162 170. -   [Reference 14] Little, S., Pogosyan, A., Neal, S., Zavala, B.,     Zrinzo, L., Hariz, M., . . . Brown, P., (2013), ‘Adaptive deep brain     stimulation in advanced parkinson disease: adaptive dbs in pd’,     Annals of Neurology, vol. 74, no. 3, pp. 449-457, Web:     http://doi.wiley.com/10.1002/ana.23951 

1. An emulation apparatus arranged to emulate an electrophysiological signal derived from a target area of the nervous system of a human or animal body under the influence of a stimulation signal applied to the human or animal body, the emulation apparatus comprising: a prior signal generator arranged to generate a prior signal representing an electrophysiological signal derived from a target area of the nervous system of a human or animal body in the absence of a stimulation signal; a test signal input arranged to receive a test signal representing a stimulation signal applied to the human or animal body; a modelling unit arranged to derive a modulation signal, which modulation signal represents the degree of modulation of the electrophysiological signal by the stimulation signal, from the test signal in accordance with a model implemented within the modelling unit of the temporal evolution of the modulation of the electrophysiological signal caused by the stimulation signal; and a modulation unit arranged to modulate the prior signal in accordance with the modulation signal to output an emulation signal representing an electrophysiological signal derived under the influence of the stimulation signal.
 2. An emulation apparatus according to claim 1, wherein the model represents an algebraic change in the modulation with at least one parameter of the stimulation signal.
 3. An emulation apparatus according to claim 1, wherein the model includes two cascaded differential stages with time constants of different orders of magnitude.
 4. An emulation apparatus according to claim 3, wherein one of the time constants correspond to the low pass response of neural membranes of neurons to the stimulation signal.
 5. An emulation apparatus according to claim 3, wherein one of the time constants represents the dynamic response of a gross average of the electrophysiological signal derived from the target area of the nervous system to the stimulation signal.
 6. An emulation apparatus according to claim 1, wherein the model further represents a saturation of the modulation at a magnitude that is dependent on at least one parameter of the stimulation signal.
 7. An emulation apparatus according to claim 6, wherein the model further represents a saturation of the modulation at magnitudes that are dependent on plural parameters of the stimulation signal.
 8. An emulation apparatus according to claim 1, wherein the model represents a gain of the modulation with respect to plural parameters of the stimulation signal.
 9. An emulation apparatus according to claim 1, further comprising an external disturbance signal generator arranged to generate an external disturbance signal representing external disturbances to the electrophysiological signal, the modulation unit being arranged to add the external disturbance signal to the emulation signal.
 10. An emulation apparatus according to claim 9, wherein the external disturbances include one or more of: artefacts of the stimulation signal on the signal measured from the human or animal body; DC-drift bias; electrocardiogram artefacts; and electrical noise.
 11. An emulation apparatus according to claim 1, wherein the electrophysiological signal comprises a signal representing a frequency domain parameter of a signal measured from the human or animal body.
 12. An emulation apparatus according to claim 1, wherein the prior signal is a synthetic signal, or the prior signal is, or is derived from, a signal measured from an actual human or animal body.
 13. An emulation apparatus according to claim 1, wherein the test signal comprises a temporal signal representing the stimulation signal or comprises parameters representing the waveform of the stimulation signal.
 14. An emulation apparatus according to claim 1 implemented by electronic components.
 15. A method of emulating an electrophysiological signal derived from a target area of the nervous system of a human or animal body under the influence of a stimulation signal applied to the human or animal body, the method comprising: generating a prior signal representing an electrophysiological signal derived from a target area of the nervous system of a human or animal body in the absence of a stimulation signal; receiving a test signal representing a stimulation signal applied to the human or animal body; deriving a modulation signal, which modulation signal represents the degree of modulation of the electrophysiological signal by the stimulation signal, from the test signal in accordance with a model of the temporal evolution of the modulation of the electrophysiological signal caused by the stimulation signal; and modulating the prior signal in accordance with the modulation signal to output an emulation signal representing an electrophysiological signal derived under the influence of the stimulation signal.
 16. A method according to claim 15, wherein the model represents an exponential decrease in the modulation with at least one parameter of the stimulation signal.
 17. A method according to claim 15, wherein the model includes two cascaded first-order continuous-time stages with time constants of different orders of magnitude.
 18. A method according to claim 17, wherein one of the time constants represents the low pass response of neural membranes of neurons to the stimulation signal.
 19. A method according to claim 17, wherein one of the time constants represents the dynamic response of an envelope of the electrophysiological signal derived from the target area of the nervous system to the stimulation signal.
 20. A method according to claim 15, wherein the model further represents a saturation of the modulation at a magnitude that is dependent on at least one parameter of the stimulation signal.
 21. A method according to claim 20, wherein the model further represents a saturation of the modulation at magnitudes that are dependent on plural parameters of the stimulation signal.
 22. A method according to claim 15, wherein the model represents a gain of the modulation that is dependent on plural parameters of the stimulation signal.
 23. A method according to claim 15, further comprising generating an external disturbance signal representing external disturbances to the electrophysiological signal, and add the external disturbance signal to the emulation signal.
 24. A method according to claim 23, wherein the external disturbances include one or more of: artefacts of the stimulation signal on the signal measured from the human or animal body; DC-drift bias; electrocardiogram artefacts; and electrical noise.
 25. A method according to claim 15, wherein electrophysiological signal comprises a signal representing a frequency domain parameter of a signal measured from the human or animal body.
 26. A method according to claim 15, wherein the prior signal is a synthetic signal, or the prior signal is, or is derived from, a signal measured from an actual human or animal body.
 27. A method according to claim 15, wherein the test signal comprises a temporal signal representing the stimulation signal or comprises parameters representing the waveform of the stimulation signal.
 28. A computer program capable of execution by a computer apparatus and configured, on execution, to cause the computer apparatus to perform a method according to claim
 15. 29. A computer-readable storage medium storing a computer program according to claim
 28. 